Class TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler.Bound<T extends java.lang.annotation.Annotation>
- java.lang.Object
-
- net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler.Bound<T>
-
- Type Parameters:
T
- The annotation type of a given handler.
- All Implemented Interfaces:
TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler
- Enclosing interface:
- TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler
@Enhance public static class TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler.Bound<T extends java.lang.annotation.Annotation> extends java.lang.Object implements TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler
A bound handler represents an unambiguous parameter binder that was located for a given array of annotations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler
TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler.Bound<T extends java.lang.annotation.Annotation>, TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler.Unbound
-
-
Field Summary
Fields Modifier and Type Field Description private AnnotationDescription.Loadable<T>
annotation
The annotation value that lead to the binding of this handler.private TargetMethodAnnotationDrivenBinder.ParameterBinder<T>
parameterBinder
The parameter binder that is actually responsible for binding the parameter.private ParameterDescription
target
The target parameter being handled.private Assigner.Typing
typing
The typing to apply.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Bound(ParameterDescription target, TargetMethodAnnotationDrivenBinder.ParameterBinder<T> parameterBinder, AnnotationDescription.Loadable<T> annotation, Assigner.Typing typing)
Creates a new bound handler.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodDelegationBinder.ParameterBinding<?>
bind(MethodDescription source, Implementation.Target implementationTarget, Assigner assigner)
Handles a parameter binding.boolean
isBound()
Indicates if this handler was explicitly bound.protected static TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler
of(ParameterDescription target, TargetMethodAnnotationDrivenBinder.ParameterBinder<?> parameterBinder, AnnotationDescription annotation, Assigner.Typing typing)
Creates a handler for a given annotation.
-
-
-
Field Detail
-
target
private final ParameterDescription target
The target parameter being handled.
-
parameterBinder
private final TargetMethodAnnotationDrivenBinder.ParameterBinder<T extends java.lang.annotation.Annotation> parameterBinder
The parameter binder that is actually responsible for binding the parameter.
-
annotation
private final AnnotationDescription.Loadable<T extends java.lang.annotation.Annotation> annotation
The annotation value that lead to the binding of this handler.
-
typing
private final Assigner.Typing typing
The typing to apply.
-
-
Constructor Detail
-
Bound
protected Bound(ParameterDescription target, TargetMethodAnnotationDrivenBinder.ParameterBinder<T> parameterBinder, AnnotationDescription.Loadable<T> annotation, Assigner.Typing typing)
Creates a new bound handler.- Parameters:
target
- The target parameter being handled.parameterBinder
- The parameter binder that is actually responsible for binding the parameter.annotation
- The annotation value that lead to the binding of this handler.typing
- The typing to apply.
-
-
Method Detail
-
of
protected static TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler of(ParameterDescription target, TargetMethodAnnotationDrivenBinder.ParameterBinder<?> parameterBinder, AnnotationDescription annotation, Assigner.Typing typing)
Creates a handler for a given annotation.- Parameters:
target
- The target parameter being handled.parameterBinder
- The parameter binder that should process an annotation.annotation
- An annotation instance that can be understood by this parameter binder.typing
- The typing to apply.- Returns:
- A handler for processing the given annotation.
-
isBound
public boolean isBound()
Indicates if this handler was explicitly bound.- Specified by:
isBound
in interfaceTargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler
- Returns:
true
if this handler was explicitly bound.
-
bind
public MethodDelegationBinder.ParameterBinding<?> bind(MethodDescription source, Implementation.Target implementationTarget, Assigner assigner)
Handles a parameter binding.- Specified by:
bind
in interfaceTargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler
- Parameters:
source
- The intercepted source method.implementationTarget
- The target of the current implementation.assigner
- The assigner to use.- Returns:
- A parameter binding that reflects the given arguments.
-
-