Class TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler.Bound<T extends 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 Annotation>
extends 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 Annotation>, TargetMethodAnnotationDrivenBinder.DelegationProcessor.Handler.Unbound
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AnnotationDescription.Loadable<T>
The annotation value that lead to the binding of this handler.private final TargetMethodAnnotationDrivenBinder.ParameterBinder<T>
The parameter binder that is actually responsible for binding the parameter.private final ParameterDescription
The target parameter being handled.private final Assigner.Typing
The typing to apply. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Bound
(ParameterDescription target, TargetMethodAnnotationDrivenBinder.ParameterBinder<T> parameterBinder, AnnotationDescription.Loadable<T> annotation, Assigner.Typing typing) Creates a new bound handler. -
Method Summary
Modifier and TypeMethodDescriptionbind
(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 Details
-
target
The target parameter being handled. -
parameterBinder
private final TargetMethodAnnotationDrivenBinder.ParameterBinder<T extends Annotation> parameterBinderThe 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.
-
-
Constructor Details
-
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 Details
-
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.
-