Class TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<S extends Annotation>
java.lang.Object
net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<S>
- Type Parameters:
S
- TheAnnotation.annotationType()
handled by this parameter binder.
- All Implemented Interfaces:
TargetMethodAnnotationDrivenBinder.ParameterBinder<S>
- Direct Known Subclasses:
FieldGetterHandle.Binder.Delegate
,FieldProxy.Binder
,FieldSetterHandle.Binder.Delegate
,FieldValue.Binder.Delegate
- Enclosing interface:
TargetMethodAnnotationDrivenBinder.ParameterBinder<T extends Annotation>
public abstract static class TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<S extends Annotation>
extends Object
implements TargetMethodAnnotationDrivenBinder.ParameterBinder<S>
A parameter binder that binds a field's value.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder
TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<S extends Annotation>, TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFixedValue<S extends Annotation>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
Indicates that a name should be extracted from an accessor method.Fields inherited from interface net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder
DEFAULTS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbind
(AnnotationDescription.Loadable<S> annotation, MethodDescription source, ParameterDescription target, Implementation.Target implementationTarget, Assigner assigner, Assigner.Typing typing) Creates a parameter binding for the given target parameter.protected abstract MethodDelegationBinder.ParameterBinding
<?> bind
(FieldDescription fieldDescription, AnnotationDescription.Loadable<S> annotation, MethodDescription source, ParameterDescription target, Implementation.Target implementationTarget, Assigner assigner) Creates a parameter binding for the given target parameter.protected abstract TypeDescription
declaringType
(AnnotationDescription.Loadable<S> annotation) Extracts the declaring type from an annotation.protected abstract String
fieldName
(AnnotationDescription.Loadable<S> annotation) Extracts the field name from an annotation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder
getHandledType
-
Field Details
-
BEAN_PROPERTY
Indicates that a name should be extracted from an accessor method.- See Also:
-
-
Constructor Details
-
ForFieldBinding
public ForFieldBinding()
-
-
Method Details
-
bind
public MethodDelegationBinder.ParameterBinding<?> bind(AnnotationDescription.Loadable<S> annotation, MethodDescription source, ParameterDescription target, Implementation.Target implementationTarget, Assigner assigner, Assigner.Typing typing) Creates a parameter binding for the given target parameter.- Specified by:
bind
in interfaceTargetMethodAnnotationDrivenBinder.ParameterBinder<S extends Annotation>
- Parameters:
annotation
- The annotation that was cause for the delegation to this argument binder.source
- The intercepted source method.target
- Tge target parameter that is subject to be bound to intercepting thesource
method.implementationTarget
- The target of the current implementation that is subject to this binding.assigner
- An assigner that can be used for applying the binding.typing
- The typing to apply.- Returns:
- A parameter binding for the requested target method parameter.
-
fieldName
Extracts the field name from an annotation.- Parameters:
annotation
- The annotation from which to extract the field name.- Returns:
- The field name defined by the handled annotation.
-
declaringType
Extracts the declaring type from an annotation.- Parameters:
annotation
- The annotation from which to extract the declaring type.- Returns:
- The declaring type defined by the handled annotation.
-
bind
protected abstract MethodDelegationBinder.ParameterBinding<?> bind(FieldDescription fieldDescription, AnnotationDescription.Loadable<S> annotation, MethodDescription source, ParameterDescription target, Implementation.Target implementationTarget, Assigner assigner) Creates a parameter binding for the given target parameter.- Parameters:
fieldDescription
- The field for which this binder binds a value.annotation
- The annotation that was cause for the delegation to this argument binder.source
- The intercepted source method.target
- Tge target parameter that is subject to be bound to intercepting thesource
method.implementationTarget
- The target of the current implementation that is subject to this binding.assigner
- An assigner that can be used for applying the binding.- Returns:
- A parameter binding for the requested target method parameter.
-