Class TargetMethodAnnotationDrivenBinder
- java.lang.Object
-
- net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder
-
- All Implemented Interfaces:
MethodDelegationBinder
@Enhance public class TargetMethodAnnotationDrivenBinder extends java.lang.Object implements MethodDelegationBinder
ThisMethodDelegationBinder
binds method by analyzing annotations found on the target method that is subject to a method binding.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
TargetMethodAnnotationDrivenBinder.DelegationProcessor
A delegation processor is a helper class for aTargetMethodAnnotationDrivenBinder
for performing its actual logic.static interface
TargetMethodAnnotationDrivenBinder.ParameterBinder<T extends java.lang.annotation.Annotation>
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
TargetMethodAnnotationDrivenBinder.Record
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
Fields Modifier and Type Field Description private TargetMethodAnnotationDrivenBinder.DelegationProcessor
delegationProcessor
The processor for performing an actual method delegation.
-
Constructor Summary
Constructors Modifier Constructor Description protected
TargetMethodAnnotationDrivenBinder(TargetMethodAnnotationDrivenBinder.DelegationProcessor delegationProcessor)
Creates a new target method annotation-driven binder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodDelegationBinder.Record
compile(MethodDescription candidate)
Compiles this method delegation binder for a target method.static MethodDelegationBinder
of(java.util.List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders)
Creates a new method delegation binder that binds method based on annotations found on the target method.
-
-
-
Field Detail
-
delegationProcessor
private final TargetMethodAnnotationDrivenBinder.DelegationProcessor delegationProcessor
The processor for performing an actual method delegation.
-
-
Constructor Detail
-
TargetMethodAnnotationDrivenBinder
protected TargetMethodAnnotationDrivenBinder(TargetMethodAnnotationDrivenBinder.DelegationProcessor delegationProcessor)
Creates a new target method annotation-driven binder.- Parameters:
delegationProcessor
- The delegation processor to use.
-
-
Method Detail
-
of
public static MethodDelegationBinder of(java.util.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
public MethodDelegationBinder.Record compile(MethodDescription candidate)
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.
-
-