Package com.tonic.analysis.instruction
Enum PutFieldInstruction.FieldType
- java.lang.Object
-
- java.lang.Enum<PutFieldInstruction.FieldType>
-
- com.tonic.analysis.instruction.PutFieldInstruction.FieldType
-
- All Implemented Interfaces:
Serializable,Comparable<PutFieldInstruction.FieldType>
- Enclosing class:
- PutFieldInstruction
public static enum PutFieldInstruction.FieldType extends Enum<PutFieldInstruction.FieldType>
The field-write kinds (instance PUTFIELD vs static PUTSTATIC), each pairing a JVM opcode with its mnemonic.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PutFieldInstruction.FieldTypefromOpcode(int opcode)Looks up the field-write kind for a JVM opcode.StringgetMnemonic()intgetOpcode()static PutFieldInstruction.FieldTypevalueOf(String name)Returns the enum constant of this type with the specified name.static PutFieldInstruction.FieldType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PUTFIELD
public static final PutFieldInstruction.FieldType PUTFIELD
Write to an instance field, consuming an object reference as well as the value.
-
PUTSTATIC
public static final PutFieldInstruction.FieldType PUTSTATIC
Write to a static field, consuming only the value and triggering class initialization.
-
-
Method Detail
-
values
public static PutFieldInstruction.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 (PutFieldInstruction.FieldType c : PutFieldInstruction.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 PutFieldInstruction.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 PutFieldInstruction.FieldType fromOpcode(int opcode)
Looks up the field-write kind for a JVM opcode.- Parameters:
opcode- the JVM opcode- Returns:
- the matching kind, or null if the opcode is not PUTFIELD or PUTSTATIC
-
-