Class FieldProxy.Binder.FieldResolver.ForGetter
java.lang.Object
net.bytebuddy.implementation.bind.annotation.FieldProxy.Binder.FieldResolver.ForGetter
- All Implemented Interfaces:
FieldProxy.Binder.FieldResolver
- Enclosing interface:
FieldProxy.Binder.FieldResolver
@Enhance
public static class FieldProxy.Binder.FieldResolver.ForGetter
extends Object
implements FieldProxy.Binder.FieldResolver
A field resolver for a getter accessor.
-
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
FieldsModifier and TypeFieldDescriptionprivate final MethodDescription.InDefinedShape
The getter method. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForGetter
(MethodDescription.InDefinedShape getterMethod) Creates a new getter field resolver. -
Method Summary
Modifier and TypeMethodDescriptionapply
(DynamicType.Builder<?> builder, FieldDescription fieldDescription, Assigner assigner, MethodAccessorFactory methodAccessorFactory) Applies this field resolver to a dynamic type.Returns the type of the field access proxy.boolean
Returnstrue
if the field access can be established.
-
Field Details
-
getterMethod
The getter method.
-
-
Constructor Details
-
ForGetter
Creates a new getter field resolver.- Parameters:
getterMethod
- The getter method.
-
-
Method Details
-
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
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.
-