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 classAn auxiliary type for performing the redirection of a method invocation as requested by thePipeannotation.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 MethodDescriptionThe method which implements the behavior of forwarding a method invocation.private static final MethodDescription.InDefinedShapeA description of thePipe.serializableProxy()method.Fields inherited from interface net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder
DEFAULTS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBinder(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 aPipeannotation.install(TypeDescription typeDescription) Installs a given type for use on aPipeannotation.private static MethodDescriptiononlyMethod(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 aPipeannotation. The given type must be an interface without any super interfaces and a single method which maps anObjecttype to anotherObjecttype. The use of generics is permitted.- Parameters:
type- The type to install.- Returns:
- A binder for the
Pipeannotation.
-
install
public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe> install(TypeDescription typeDescription) Installs a given type for use on aPipeannotation. The given type must be an interface without any super interfaces and a single method which maps anObjecttype to anotherObjecttype. The use of generics is permitted.- Parameters:
typeDescription- The type to install.- Returns:
- A binder for the
Pipeannotation.
-
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:
getHandledTypein 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:
bindin 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 thesourcemethod.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.
-