public enum FieldAccess extends java.lang.Enum<FieldAccess>
Modifier and Type | Class and Description |
---|---|
protected class |
FieldAccess.AccessDispatcher
A dispatcher for implementing a non-generic read or write access on a field.
|
static interface |
FieldAccess.Defined
Representation of a field access for which a getter and a setter can be created.
|
protected static class |
FieldAccess.OfGenericField
A dispatcher for implementing a generic read or write access on a field.
|
Enum Constant and Description |
---|
INSTANCE
The representation of field access to an instance field.
|
STATIC
The representation of field access to a static field.
|
Modifier and Type | Field and Description |
---|---|
private int |
getterOpcode
The opcode for getting a field value.
|
private int |
putterOpcode
The opcode for setting a field value.
|
private int |
targetSizeChange
The amount of operand slots this field access operation consumes when it is applied before eventually
adding new values onto the operand stack.
|
Modifier and Type | Method and Description |
---|---|
static StackManipulation |
forEnumeration(EnumerationDescription enumerationDescription)
Creates an accessor to read an enumeration value.
|
static FieldAccess.Defined |
forField(FieldDescription.InDefinedShape fieldDescription)
Creates a field access representation for a given field.
|
static FieldAccess.Defined |
forField(FieldDescription fieldDescription)
Creates a field access representation for a given field.
|
static FieldAccess |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static FieldAccess[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FieldAccess STATIC
public static final FieldAccess INSTANCE
private final int putterOpcode
private final int getterOpcode
private final int targetSizeChange
public static FieldAccess[] values()
for (FieldAccess c : FieldAccess.values()) System.out.println(c);
public static FieldAccess valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static StackManipulation forEnumeration(EnumerationDescription enumerationDescription)
enumerationDescription
- The description of the enumeration.public static FieldAccess.Defined forField(FieldDescription.InDefinedShape fieldDescription)
fieldDescription
- The field to be accessed.public static FieldAccess.Defined forField(FieldDescription fieldDescription)
fieldDescription
- The field to be accessed.