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 class
A delegation processor is a helper class for aTargetMethodAnnotationDrivenBinder
for performing its actual logic.static interface
A parameter binder is used as a delegate for binding a parameter according to a particular annotation type found on this parameter.protected static class
A 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.DelegationProcessor
The processor for performing an actual method delegation. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TargetMethodAnnotationDrivenBinder
(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 MethodDelegationBinder
of
(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.ParameterBinding
for a specific annotation.- Returns:
- An appropriate method delegation binder.
-
compile
Compiles this method delegation binder for a target method.- Specified by:
compile
in interfaceMethodDelegationBinder
- Parameters:
candidate
- The target method to bind.- Returns:
- A compiled target for binding.
-