Class FieldAccess.OfGenericField
java.lang.Object
net.bytebuddy.implementation.bytecode.member.FieldAccess.OfGenericField
- All Implemented Interfaces:
FieldAccess.Defined
- Enclosing class:
FieldAccess
@Enhance
protected static class FieldAccess.OfGenericField
extends Object
implements FieldAccess.Defined
A dispatcher for implementing a generic read or write access on a field.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FieldAccess.Defined
An accessor for the field in its defined shape.private final TypeDefinition
The resolved generic field type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
OfGenericField
(TypeDefinition targetType, FieldAccess.Defined defined) Creates a new dispatcher for a generic field. -
Method Summary
Modifier and TypeMethodDescriptionprotected static FieldAccess.Defined
of
(FieldDescription fieldDescription, FieldAccess.Defined fieldAccess) Creates a generic access dispatcher for a given field.read()
Creates a getter representation for a given field.write()
Creates a setter representation for a given field.
-
Field Details
-
targetType
The resolved generic field type. -
defined
An accessor for the field in its defined shape.
-
-
Constructor Details
-
OfGenericField
Creates a new dispatcher for a generic field.- Parameters:
targetType
- The resolved generic field type.defined
- An accessor for the field in its defined shape.
-
-
Method Details
-
of
protected static FieldAccess.Defined of(FieldDescription fieldDescription, FieldAccess.Defined fieldAccess) Creates a generic access dispatcher for a given field.- Parameters:
fieldDescription
- The field that is being accessed.fieldAccess
- A field accessor for the field in its defined shape.- Returns:
- A field access dispatcher for the given field.
-
read
Creates a getter representation for a given field.- Specified by:
read
in interfaceFieldAccess.Defined
- Returns:
- A stack manipulation representing the retrieval of a field value.
-
write
Creates a setter representation for a given field.- Specified by:
write
in interfaceFieldAccess.Defined
- Returns:
- A stack manipulation representing the setting of a field value.
-