Class Pipe.Binder
java.lang.Object
net.bytebuddy.implementation.bind.annotation.Pipe.Binder
- All Implemented Interfaces:
TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe>
- Enclosing class:
- Pipe
@Enhance
public static class Pipe.Binder
extends Object
implements TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe>
A
TargetMethodAnnotationDrivenBinder.ParameterBinder
for binding the Pipe
annotation.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
An auxiliary type for performing the redirection of a method invocation as requested by thePipe
annotation.Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder
TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<S extends Annotation>, TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFixedValue<S extends Annotation>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodDescription
The method which implements the behavior of forwarding a method invocation.private static final MethodDescription.InDefinedShape
A description of thePipe.serializableProxy()
method.Fields inherited from interface net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder
DEFAULTS
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Binder
(MethodDescription forwardingMethod) Creates a new binder. -
Method Summary
Modifier and TypeMethodDescriptionbind
(AnnotationDescription.Loadable<Pipe> annotation, MethodDescription source, ParameterDescription target, Implementation.Target implementationTarget, Assigner assigner, Assigner.Typing typing) Creates a parameter binding for the given target parameter.The annotation type that is handled by this parameter binder.Installs a given type for use on aPipe
annotation.install
(TypeDescription typeDescription) Installs a given type for use on aPipe
annotation.private static MethodDescription
onlyMethod
(TypeDescription typeDescription) Locates the only method of a type that is compatible to being overridden for invoking the proxy.
-
Field Details
-
SERIALIZABLE_PROXY
A description of thePipe.serializableProxy()
method. -
forwardingMethod
-
-
Constructor Details
-
Binder
Creates a new binder. This constructor is not doing any validation of the forwarding method and its declaring type. Such validation is normally performed by theinstall(Class)
method.
-
-
Method Details
-
install
Installs a given type for use on aPipe
annotation. The given type must be an interface without any super interfaces and a single method which maps anObject
type to anotherObject
type. The use of generics is permitted.- Parameters:
type
- The type to install.- Returns:
- A binder for the
Pipe
annotation.
-
install
public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe> install(TypeDescription typeDescription) Installs a given type for use on aPipe
annotation. The given type must be an interface without any super interfaces and a single method which maps anObject
type to anotherObject
type. The use of generics is permitted.- Parameters:
typeDescription
- The type to install.- Returns:
- A binder for the
Pipe
annotation.
-
onlyMethod
Locates the only method of a type that is compatible to being overridden for invoking the proxy.- Parameters:
typeDescription
- The type that is being installed.- Returns:
- Its only method after validation.
-
getHandledType
The annotation type that is handled by this parameter binder.- Specified by:
getHandledType
in interfaceTargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe>
- Returns:
- The
Annotation.annotationType()
handled by this parameter binder.
-
bind
public MethodDelegationBinder.ParameterBinding<?> bind(AnnotationDescription.Loadable<Pipe> annotation, MethodDescription source, ParameterDescription target, Implementation.Target implementationTarget, Assigner assigner, Assigner.Typing typing) Creates a parameter binding for the given target parameter.- Specified by:
bind
in interfaceTargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe>
- Parameters:
annotation
- The annotation that was cause for the delegation to this argument binder.source
- The intercepted source method.target
- Tge target parameter that is subject to be bound to intercepting thesource
method.implementationTarget
- The target of the current implementation that is subject to this binding.assigner
- An assigner that can be used for applying the binding.typing
- The typing to apply.- Returns:
- A parameter binding for the requested target method parameter.
-