Class Morph.Binder
java.lang.Object
net.bytebuddy.implementation.bind.annotation.Morph.Binder
- All Implemented Interfaces:
TargetMethodAnnotationDrivenBinder.ParameterBinder<Morph>
- Enclosing class:
Morph
@Enhance
public static class Morph.Binder
extends Object
implements TargetMethodAnnotationDrivenBinder.ParameterBinder<Morph>
A binder for the
Morph annotation.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceA default method locator is responsible for looking up a default method to a given source method.protected static classA proxy that implements the installed interface in order to allow for a morphed super method invocation.Nested classes/interfaces inherited from interface TargetMethodAnnotationDrivenBinder.ParameterBinder
TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<S>, TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFixedValue<S> -
Field Summary
Fields inherited from interface TargetMethodAnnotationDrivenBinder.ParameterBinder
DEFAULTS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBinder(MethodDescription forwardingMethod) Creates a new binder. -
Method Summary
Modifier and TypeMethodDescriptionbind(AnnotationDescription.Loadable<Morph> 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 aMorphannotation.install(TypeDescription typeDescription) Installs a given type for use on aMorphannotation.
-
Constructor Details
-
Binder
Creates a new binder.- Parameters:
forwardingMethod- The method which is overridden for generating the proxy class.
-
-
Method Details
-
install
Installs a given type for use on aMorphannotation. The given type must be an interface without any super interfaces and a single method which maps anObjectarray to aObjecttype. The use of generics is permitted.- Parameters:
type- The type to install.- Returns:
- A binder for the
Morphannotation.
-
install
public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Morph> install(TypeDescription typeDescription) Installs a given type for use on aMorphannotation. The given type must be an interface without any super interfaces and a single method which maps anObjectarray to aObjecttype. The use of generics is permitted.- Parameters:
typeDescription- The type to install.- Returns:
- A binder for the
Morphannotation.
-
getHandledType
The annotation type that is handled by this parameter binder.- Specified by:
getHandledTypein interfaceTargetMethodAnnotationDrivenBinder.ParameterBinder<Morph>- Returns:
- The
Annotation.annotationType()handled by this parameter binder.
-
bind
public MethodDelegationBinder.ParameterBinding<?> bind(AnnotationDescription.Loadable<Morph> 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<Morph>- 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.
-