@HashCodeAndEqualsPlugin.Enhance protected static class TargetMethodAnnotationDrivenBinder.DelegationProcessor extends java.lang.Object
TargetMethodAnnotationDrivenBinder
for performing its actual logic. By outsourcing this logic to this helper class, a cleaner implementation
can be provided.Modifier and Type | Class and Description |
---|---|
protected static interface |
TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler
A handler is responsible for processing a parameter's binding.
|
Modifier and Type | Field and 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.
|
Modifier | Constructor and Description |
---|---|
protected |
DelegationProcessor(java.util.Map<? extends TypeDescription,? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders)
Creates a new delegation processor.
|
Modifier and Type | Method and 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.
|
private final java.util.Map<? extends TypeDescription,? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders
protected DelegationProcessor(java.util.Map<? extends TypeDescription,? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders)
parameterBinders
- A mapping of parameter binders by their handling type.protected static TargetMethodAnnotationDrivenBinder.DelegationProcessor of(java.util.List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders)
parameterBinders
- A list of parameter binder delegates. Each such delegate is responsible for creating
a MethodDelegationBinder.ParameterBinding
for a specific annotation.protected TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler prepare(ParameterDescription target)
target
- The target parameter being handled.