@HashCodeAndEqualsPlugin.Enhance public static class FieldProxy.Binder.FieldResolver.ForGetterSetterPair extends java.lang.Object implements FieldProxy.Binder.FieldResolver
FieldProxy.Binder.FieldResolver.Factory, FieldProxy.Binder.FieldResolver.ForGetter, FieldProxy.Binder.FieldResolver.ForGetterSetterPair, FieldProxy.Binder.FieldResolver.ForSetter, FieldProxy.Binder.FieldResolver.Unresolved
Modifier and Type | Field and Description |
---|---|
private MethodDescription.InDefinedShape |
getterMethod
The getter method.
|
private TypeDescription |
proxyType
The type of the accessor proxy.
|
private MethodDescription.InDefinedShape |
setterMethod
The setter method.
|
Modifier | Constructor and Description |
---|---|
protected |
ForGetterSetterPair(TypeDescription proxyType,
MethodDescription.InDefinedShape getterMethod,
MethodDescription.InDefinedShape setterMethod)
Creates a new field resolver for an accessor that both gets and sets a field value.
|
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder<?> |
apply(DynamicType.Builder<?> builder,
FieldDescription fieldDescription,
Assigner assigner,
MethodAccessorFactory methodAccessorFactory)
Applies this field resolver to a dynamic type.
|
TypeDescription |
getProxyType()
Returns the type of the field access proxy.
|
boolean |
isResolved()
Returns
true if the field access can be established. |
private final TypeDescription proxyType
private final MethodDescription.InDefinedShape getterMethod
private final MethodDescription.InDefinedShape setterMethod
protected ForGetterSetterPair(TypeDescription proxyType, MethodDescription.InDefinedShape getterMethod, MethodDescription.InDefinedShape setterMethod)
proxyType
- The type of the accessor proxy.getterMethod
- The getter method.setterMethod
- The setter method.public boolean isResolved()
true
if the field access can be established.isResolved
in interface FieldProxy.Binder.FieldResolver
true
if the field access can be established.public TypeDescription getProxyType()
getProxyType
in interface FieldProxy.Binder.FieldResolver
public DynamicType.Builder<?> apply(DynamicType.Builder<?> builder, FieldDescription fieldDescription, Assigner assigner, MethodAccessorFactory methodAccessorFactory)
apply
in interface FieldProxy.Binder.FieldResolver
builder
- The dynamic type builder to use.fieldDescription
- The accessed field.assigner
- The assigner to use.methodAccessorFactory
- The method accessor factory to use.