Class FieldProxy.Binder.FieldResolver.ForGetterSetterPair
- java.lang.Object
-
- net.bytebuddy.implementation.bind.annotation.FieldProxy.Binder.FieldResolver.ForGetterSetterPair
-
- All Implemented Interfaces:
FieldProxy.Binder.FieldResolver
- Enclosing interface:
- FieldProxy.Binder.FieldResolver
@Enhance public static class FieldProxy.Binder.FieldResolver.ForGetterSetterPair extends java.lang.Object implements FieldProxy.Binder.FieldResolver
A field resolver for an accessor that both gets and sets a field value.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bind.annotation.FieldProxy.Binder.FieldResolver
FieldProxy.Binder.FieldResolver.Factory, FieldProxy.Binder.FieldResolver.ForGetter, FieldProxy.Binder.FieldResolver.ForGetterSetterPair, FieldProxy.Binder.FieldResolver.ForSetter, FieldProxy.Binder.FieldResolver.Unresolved
-
-
Field Summary
Fields Modifier and Type Field Description private MethodDescription.InDefinedShape
getterMethod
The getter method.private TypeDescription
proxyType
The type of the accessor proxy.private MethodDescription.InDefinedShape
setterMethod
The setter method.
-
Constructor Summary
Constructors Modifier Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
Returnstrue
if the field access can be established.
-
-
-
Field Detail
-
proxyType
private final TypeDescription proxyType
The type of the accessor proxy.
-
getterMethod
private final MethodDescription.InDefinedShape getterMethod
The getter method.
-
setterMethod
private final MethodDescription.InDefinedShape setterMethod
The setter method.
-
-
Constructor Detail
-
ForGetterSetterPair
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.- Parameters:
proxyType
- The type of the accessor proxy.getterMethod
- The getter method.setterMethod
- The setter method.
-
-
Method Detail
-
isResolved
public boolean isResolved()
Returnstrue
if the field access can be established.- Specified by:
isResolved
in interfaceFieldProxy.Binder.FieldResolver
- Returns:
true
if the field access can be established.
-
getProxyType
public TypeDescription getProxyType()
Returns the type of the field access proxy.- Specified by:
getProxyType
in interfaceFieldProxy.Binder.FieldResolver
- Returns:
- The type of the field access proxy.
-
apply
public DynamicType.Builder<?> apply(DynamicType.Builder<?> builder, FieldDescription fieldDescription, Assigner assigner, MethodAccessorFactory methodAccessorFactory)
Applies this field resolver to a dynamic type.- Specified by:
apply
in interfaceFieldProxy.Binder.FieldResolver
- Parameters:
builder
- The dynamic type builder to use.fieldDescription
- The accessed field.assigner
- The assigner to use.methodAccessorFactory
- The method accessor factory to use.- Returns:
- The builder for creating the field accessor proxy type.
-
-