@HashCodeAndEqualsPlugin.Enhance public static class Pipe.Binder extends java.lang.Object implements TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe>
TargetMethodAnnotationDrivenBinder.ParameterBinder
for binding the Pipe
annotation.Modifier and Type | Class and Description |
---|---|
protected static class |
Pipe.Binder.Redirection
An auxiliary type for performing the redirection of a method invocation as requested by the
Pipe annotation. |
TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<S extends java.lang.annotation.Annotation>, TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFixedValue<S extends java.lang.annotation.Annotation>
Modifier and Type | Field and Description |
---|---|
private MethodDescription |
forwardingMethod
The method which implements the behavior of forwarding a method invocation.
|
DEFAULTS
Modifier | Constructor and Description |
---|---|
protected |
Binder(MethodDescription forwardingMethod)
Creates a new binder.
|
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.Class<Pipe> |
getHandledType()
The annotation type that is handled by this parameter binder.
|
static TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe> |
install(java.lang.Class<?> type)
Installs a given type for use on a
Pipe
annotation. |
static TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe> |
install(TypeDescription typeDescription)
Installs a given type for use on a
Pipe
annotation. |
private static MethodDescription |
onlyMethod(TypeDescription typeDescription)
Locates the only method of a type that is compatible to being overridden for invoking the proxy.
|
private final MethodDescription forwardingMethod
Object
to Object
mapping.protected Binder(MethodDescription forwardingMethod)
install(Class)
method.forwardingMethod
- The method which implements the behavior of forwarding a method invocation. This
method needs to define a single non-static method with an Object
to Object
mapping.public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe> install(java.lang.Class<?> type)
Pipe
annotation. The given type must be an interface without any super interfaces and a single method which
maps an Object
type to another Object
type. The use of generics is
permitted.type
- The type to install.Pipe
annotation.public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe> install(TypeDescription typeDescription)
Pipe
annotation. The given type must be an interface without any super interfaces and a single method which
maps an Object
type to another Object
type. The use of generics is
permitted.typeDescription
- The type to install.Pipe
annotation.private static MethodDescription onlyMethod(TypeDescription typeDescription)
typeDescription
- The type that is being installed.public java.lang.Class<Pipe> getHandledType()
getHandledType
in interface TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe>
Annotation.annotationType()
handled by this parameter binder.public MethodDelegationBinder.ParameterBinding<?> bind(AnnotationDescription.Loadable<Pipe> annotation, MethodDescription source, ParameterDescription target, Implementation.Target implementationTarget, Assigner assigner, Assigner.Typing typing)
bind
in interface TargetMethodAnnotationDrivenBinder.ParameterBinder<Pipe>
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 the source
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.