public static class Field.Binder extends Object implements TargetMethodAnnotationDrivenBinder.ParameterBinder<Field>
Field annotation.| Modifier and Type | Class and Description |
|---|---|
protected class |
Field.Binder.AccessorProxy
A proxy type for accessing a field either by a getter or a setter.
|
protected static class |
Field.Binder.AccessType
Determines the way a field is to be accessed.
|
protected static class |
Field.Binder.FieldLocator
A field locator is responsible for locating the type a field is defined in.
|
protected static class |
Field.Binder.InstanceFieldConstructor
Represents an instrumentation for implementing a proxy type constructor when a non-static field is accessed.
|
protected static class |
Field.Binder.StaticFieldConstructor
Represents an instrumentation for implementing a proxy type constructor when a static field is accessed.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Binder(MethodDescription getterMethod,
MethodDescription setterMethod)
Creates a new binder for the
Field
annotation. |
| Modifier and Type | Method and Description |
|---|---|
MethodDelegationBinder.ParameterBinding<?> |
bind(AnnotationDescription.Loadable<Field> annotation,
int targetParameterIndex,
MethodDescription source,
MethodDescription target,
Instrumentation.Target instrumentationTarget,
Assigner assigner)
Creates a parameter binding for the given target parameter.
|
boolean |
equals(Object other) |
Class<Field> |
getHandledType()
The annotation type that is handled by this parameter binder.
|
int |
hashCode() |
static TargetMethodAnnotationDrivenBinder.ParameterBinder<Field> |
install(Class<?> getterType,
Class<?> setterType)
Creates a binder by installing two proxy types which are implemented by this binder if a field getter
or a field setter is requested by using the
Field annotation. |
static TargetMethodAnnotationDrivenBinder.ParameterBinder<Field> |
install(TypeDescription getterType,
TypeDescription setterType)
Creates a binder by installing two proxy types which are implemented by this binder if a field getter
or a field setter is requested by using the
Field annotation. |
String |
toString() |
protected Binder(MethodDescription getterMethod, MethodDescription setterMethod)
Field
annotation.getterMethod - The getter method to be implemented by a getter proxy.setterMethod - The setter method to be implemented by a setter proxy.public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Field> install(Class<?> getterType, Class<?> setterType)
Field annotation.getterType - The type which should be used for getter proxies. The type must
represent an interface which defines a single method which returns an
Object return type and does not take any arguments. The use of generics
is permitted.setterType - The type which should be uses for setter proxies. The type must
represent an interface which defines a single method which returns void
and takes a signle Object-typed argument. The use of generics
is permitted.Field
annotation.public static TargetMethodAnnotationDrivenBinder.ParameterBinder<Field> install(TypeDescription getterType, TypeDescription setterType)
Field annotation.getterType - The type which should be used for getter proxies. The type must
represent an interface which defines a single method which returns an
Object return type and does not take any arguments. The use of generics
is permitted.setterType - The type which should be uses for setter proxies. The type must
represent an interface which defines a single method which returns void
and takes a signle Object-typed argument. The use of generics
is permitted.Field
annotation.public Class<Field> getHandledType()
TargetMethodAnnotationDrivenBinder.ParameterBindergetHandledType in interface TargetMethodAnnotationDrivenBinder.ParameterBinder<Field>Annotation.annotationType() handled by this parameter binder.public MethodDelegationBinder.ParameterBinding<?> bind(AnnotationDescription.Loadable<Field> annotation, int targetParameterIndex, MethodDescription source, MethodDescription target, Instrumentation.Target instrumentationTarget, Assigner assigner)
TargetMethodAnnotationDrivenBinder.ParameterBinderbind in interface TargetMethodAnnotationDrivenBinder.ParameterBinder<Field>annotation - The annotation that was cause for the delegation to this argument binder.targetParameterIndex - The index of the target method's parameter to be bound.source - The source method that is bound to the target method.target - Tge target method that is subject to be bound by the source method.instrumentationTarget - The target of the current instrumentation that is subject to this binding.assigner - An assigner that can be used for applying the binding.Copyright © 2014. All rights reserved.