Class TargetMethodAnnotationDrivenBinder.DelegationProcessor
- java.lang.Object
-
- net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.DelegationProcessor
-
- Enclosing class:
- TargetMethodAnnotationDrivenBinder
@Enhance protected static class TargetMethodAnnotationDrivenBinder.DelegationProcessor extends java.lang.Object
A delegation processor is a helper class for aTargetMethodAnnotationDrivenBinder
for performing its actual logic. By outsourcing this logic to this helper class, a cleaner implementation can be provided.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler
A handler is responsible for processing a parameter's binding.
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<? extends TypeDescription,? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>>
parameterBinders
A map of registered annotation types to the binder that is responsible for binding a parameter that is annotated with the given annotation.
-
Constructor Summary
Constructors Modifier Constructor Description protected
DelegationProcessor(java.util.Map<? extends TypeDescription,? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders)
Creates a new delegation processor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static TargetMethodAnnotationDrivenBinder.DelegationProcessor
of(java.util.List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders)
Creates a new delegation processor.protected TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler
prepare(ParameterDescription target)
Locates a handler which is responsible for processing the given parameter.
-
-
-
Field Detail
-
parameterBinders
private final java.util.Map<? extends TypeDescription,? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders
A map of registered annotation types to the binder that is responsible for binding a parameter that is annotated with the given annotation.
-
-
Constructor Detail
-
DelegationProcessor
protected DelegationProcessor(java.util.Map<? extends TypeDescription,? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders)
Creates a new delegation processor.- Parameters:
parameterBinders
- A mapping of parameter binders by their handling type.
-
-
Method Detail
-
of
protected static TargetMethodAnnotationDrivenBinder.DelegationProcessor of(java.util.List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders)
Creates a new delegation processor.- Parameters:
parameterBinders
- A list of parameter binder delegates. Each such delegate is responsible for creating aMethodDelegationBinder.ParameterBinding
for a specific annotation.- Returns:
- A corresponding delegation processor.
-
prepare
protected TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler prepare(ParameterDescription target)
Locates a handler which is responsible for processing the given parameter. If no explicit handler can be located, a fallback handler is provided.- Parameters:
target
- The target parameter being handled.- Returns:
- A handler for processing the parameter with the given annotations.
-
-