public static class FieldProxy.Binder extends TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<FieldProxy>
FieldProxy
annotation.Modifier and Type | Class and Description |
---|---|
protected class |
FieldProxy.Binder.AccessorProxy
A proxy type for accessing a field either by a getter or a setter.
|
protected static class |
FieldProxy.Binder.AccessType
Determines the way a field is to be accessed.
|
protected static class |
FieldProxy.Binder.InstanceFieldConstructor
Represents an implementation for implementing a proxy type constructor when a non-static field is accessed.
|
protected static class |
FieldProxy.Binder.StaticFieldConstructor
Represents an implementation for implementing a proxy type constructor when a static field is accessed.
|
TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<S extends Annotation>, TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFixedValue<S extends Annotation>
BEAN_PROPERTY
DEFAULTS
Modifier | Constructor and Description |
---|---|
protected |
Binder(MethodDescription getterMethod,
MethodDescription setterMethod)
Creates a new binder for the
FieldProxy
annotation. |
Modifier and Type | Method and Description |
---|---|
protected MethodDelegationBinder.ParameterBinding<?> |
bind(FieldDescription fieldDescription,
AnnotationDescription.Loadable<FieldProxy> annotation,
MethodDescription source,
ParameterDescription target,
Implementation.Target implementationTarget,
Assigner assigner)
Creates a parameter binding for the given target parameter.
|
protected TypeDescription |
declaringType(AnnotationDescription.Loadable<FieldProxy> annotation)
Extracts the declaring type from an annotation.
|
boolean |
equals(Object other) |
protected String |
fieldName(AnnotationDescription.Loadable<FieldProxy> annotation)
Extracts the field name from an annotation.
|
Class<FieldProxy> |
getHandledType()
The annotation type that is handled by this parameter binder.
|
int |
hashCode() |
static TargetMethodAnnotationDrivenBinder.ParameterBinder<FieldProxy> |
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
FieldProxy annotation. |
static TargetMethodAnnotationDrivenBinder.ParameterBinder<FieldProxy> |
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
FieldProxy annotation. |
String |
toString() |
bind
protected Binder(MethodDescription getterMethod, MethodDescription setterMethod)
FieldProxy
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<FieldProxy> install(Class<?> getterType, Class<?> setterType)
FieldProxy
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 single Object
-typed argument. The use of generics
is permitted.FieldProxy
annotation.public static TargetMethodAnnotationDrivenBinder.ParameterBinder<FieldProxy> install(TypeDescription getterType, TypeDescription setterType)
FieldProxy
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 single Object
-typed argument. The use of generics
is permitted.FieldProxy
annotation.public Class<FieldProxy> getHandledType()
TargetMethodAnnotationDrivenBinder.ParameterBinder
Annotation.annotationType()
handled by this parameter binder.protected String fieldName(AnnotationDescription.Loadable<FieldProxy> annotation)
TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding
fieldName
in class TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<FieldProxy>
annotation
- The annotation from which to extract the field name.protected TypeDescription declaringType(AnnotationDescription.Loadable<FieldProxy> annotation)
TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding
declaringType
in class TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<FieldProxy>
annotation
- The annotation from which to extract the declaring type.protected MethodDelegationBinder.ParameterBinding<?> bind(FieldDescription fieldDescription, AnnotationDescription.Loadable<FieldProxy> annotation, MethodDescription source, ParameterDescription target, Implementation.Target implementationTarget, Assigner assigner)
TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding
bind
in class TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<FieldProxy>
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 the source
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.Copyright © 2014–2016. All rights reserved.