Class TargetMethodAnnotationDrivenBinder
java.lang.Object
net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder
- All Implemented Interfaces:
MethodDelegationBinder
@Enhance
public class TargetMethodAnnotationDrivenBinder
extends Object
implements MethodDelegationBinder
This
MethodDelegationBinder binds
method by analyzing annotations found on the target method that is subject to a method binding.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA delegation processor is a helper class for aTargetMethodAnnotationDrivenBinderfor performing its actual logic.static interfaceA parameter binder is used as a delegate for binding a parameter according to a particular annotation type found on this parameter.protected static classA compiled record of a target method annotation-driven binder.Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bind.MethodDelegationBinder
MethodDelegationBinder.AmbiguityResolver, MethodDelegationBinder.BindingResolver, MethodDelegationBinder.MethodBinding, MethodDelegationBinder.MethodInvoker, MethodDelegationBinder.ParameterBinding<T>, MethodDelegationBinder.Processor, MethodDelegationBinder.TerminationHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TargetMethodAnnotationDrivenBinder.DelegationProcessorThe processor for performing an actual method delegation. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTargetMethodAnnotationDrivenBinder(TargetMethodAnnotationDrivenBinder.DelegationProcessor delegationProcessor) Creates a new target method annotation-driven binder. -
Method Summary
Modifier and TypeMethodDescriptioncompile(MethodDescription candidate) Compiles this method delegation binder for a target method.static MethodDelegationBinderof(List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders) Creates a new method delegation binder that binds method based on annotations found on the target method.
-
Field Details
-
delegationProcessor
The processor for performing an actual method delegation.
-
-
Constructor Details
-
TargetMethodAnnotationDrivenBinder
protected TargetMethodAnnotationDrivenBinder(TargetMethodAnnotationDrivenBinder.DelegationProcessor delegationProcessor) Creates a new target method annotation-driven binder.- Parameters:
delegationProcessor- The delegation processor to use.
-
-
Method Details
-
of
public static MethodDelegationBinder of(List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders) Creates a new method delegation binder that binds method based on annotations found on the target method.- Parameters:
parameterBinders- A list of parameter binder delegates. Each such delegate is responsible for creating aMethodDelegationBinder.ParameterBindingfor a specific annotation.- Returns:
- An appropriate method delegation binder.
-
compile
Compiles this method delegation binder for a target method.- Specified by:
compilein interfaceMethodDelegationBinder- Parameters:
candidate- The target method to bind.- Returns:
- A compiled target for binding.
-