Enum FieldValue.Binder
- java.lang.Object
-
- java.lang.Enum<FieldValue.Binder>
-
- net.bytebuddy.implementation.bind.annotation.FieldValue.Binder
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<FieldValue.Binder>
,TargetMethodAnnotationDrivenBinder.ParameterBinder<FieldValue>
- Enclosing class:
- FieldValue
public static enum FieldValue.Binder extends java.lang.Enum<FieldValue.Binder> implements TargetMethodAnnotationDrivenBinder.ParameterBinder<FieldValue>
Binds aFieldValue
annotation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
FieldValue.Binder.Delegate
A delegate implementation for theFieldValue.Binder
.-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder
TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<S extends java.lang.annotation.Annotation>, TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFixedValue<S extends java.lang.annotation.Annotation>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Field Summary
Fields Modifier and Type Field Description private static MethodDescription.InDefinedShape
DECLARING_TYPE
The annotation method that for the defining type.private TargetMethodAnnotationDrivenBinder.ParameterBinder<FieldValue>
delegate
A delegate parameter binder responsible for binding the parameter.private static MethodDescription.InDefinedShape
FIELD_NAME
The annotation method for the field's name.-
Fields inherited from interface net.bytebuddy.implementation.bind.annotation.TargetMethodAnnotationDrivenBinder.ParameterBinder
DEFAULTS
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Binder(TargetMethodAnnotationDrivenBinder.ParameterBinder<FieldValue> delegate)
Creates a new binder for aFieldValue
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodDelegationBinder.ParameterBinding<?>
bind(AnnotationDescription.Loadable<FieldValue> annotation, MethodDescription source, ParameterDescription target, Implementation.Target implementationTarget, Assigner assigner, Assigner.Typing typing)
Creates a parameter binding for the given target parameter.java.lang.Class<FieldValue>
getHandledType()
The annotation type that is handled by this parameter binder.static FieldValue.Binder
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static FieldValue.Binder[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final FieldValue.Binder INSTANCE
The singleton instance.
-
-
Field Detail
-
DECLARING_TYPE
private static final MethodDescription.InDefinedShape DECLARING_TYPE
The annotation method that for the defining type.
-
FIELD_NAME
private static final MethodDescription.InDefinedShape FIELD_NAME
The annotation method for the field's name.
-
delegate
private final TargetMethodAnnotationDrivenBinder.ParameterBinder<FieldValue> delegate
A delegate parameter binder responsible for binding the parameter.
-
-
Constructor Detail
-
Binder
private Binder(TargetMethodAnnotationDrivenBinder.ParameterBinder<FieldValue> delegate)
Creates a new binder for aFieldValue
.- Parameters:
delegate
- A delegate parameter binder responsible for binding the parameter.
-
-
Method Detail
-
values
public static FieldValue.Binder[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FieldValue.Binder c : FieldValue.Binder.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FieldValue.Binder valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getHandledType
public java.lang.Class<FieldValue> getHandledType()
The annotation type that is handled by this parameter binder.- Specified by:
getHandledType
in interfaceTargetMethodAnnotationDrivenBinder.ParameterBinder<FieldValue>
- Returns:
- The
Annotation.annotationType()
handled by this parameter binder.
-
bind
public MethodDelegationBinder.ParameterBinding<?> bind(AnnotationDescription.Loadable<FieldValue> 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<FieldValue>
- 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.
-
-