Enum PutFieldInstruction.FieldType

    • 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 name
        NullPointerException - 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