Package com.tonic.analysis.instruction
Enum GetFieldInstruction.FieldType
- java.lang.Object
-
- java.lang.Enum<GetFieldInstruction.FieldType>
-
- com.tonic.analysis.instruction.GetFieldInstruction.FieldType
-
- All Implemented Interfaces:
Serializable,Comparable<GetFieldInstruction.FieldType>
- Enclosing class:
- GetFieldInstruction
public static enum GetFieldInstruction.FieldType extends Enum<GetFieldInstruction.FieldType>
The field-read kinds (instance GETFIELD vs static GETSTATIC), each pairing a JVM opcode with its mnemonic.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GetFieldInstruction.FieldTypefromOpcode(int opcode)Looks up the field-read kind for a JVM opcode.StringgetMnemonic()intgetOpcode()static GetFieldInstruction.FieldTypevalueOf(String name)Returns the enum constant of this type with the specified name.static GetFieldInstruction.FieldType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
GETFIELD
public static final GetFieldInstruction.FieldType GETFIELD
Reads an instance field, popping the object reference to read it from.
-
GETSTATIC
public static final GetFieldInstruction.FieldType GETSTATIC
Reads a class-level field, taking no receiver off the stack.
-
-
Method Detail
-
values
public static GetFieldInstruction.FieldType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (GetFieldInstruction.FieldType c : GetFieldInstruction.FieldType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GetFieldInstruction.FieldType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getOpcode
public int getOpcode()
- Returns:
- the opcode
-
getMnemonic
public String getMnemonic()
- Returns:
- the mnemonic
-
fromOpcode
public static GetFieldInstruction.FieldType fromOpcode(int opcode)
Looks up the field-read kind for a JVM opcode.- Parameters:
opcode- the JVM opcode- Returns:
- the matching kind, or null if the opcode is not GETFIELD or GETSTATIC
-
-