Enum GotoInstruction.GotoType

    • Enum Constant Detail

      • GOTO_NORMAL

        public static final GotoInstruction.GotoType GOTO_NORMAL
        Plain goto, three bytes wide, carrying a signed 16-bit relative offset.
      • GOTO_WIDE

        public static final GotoInstruction.GotoType GOTO_WIDE
        Wide goto_w, five bytes wide, carrying a signed 32-bit relative offset for targets a 16-bit branch cannot reach.
    • Method Detail

      • values

        public static GotoInstruction.GotoType[] 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 (GotoInstruction.GotoType c : GotoInstruction.GotoType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static GotoInstruction.GotoType 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 GotoInstruction.GotoType fromOpcode​(int opcode)
        Looks up the goto width for a JVM opcode.
        Parameters:
        opcode - the JVM opcode
        Returns:
        the matching width, or null if the opcode is not GOTO or GOTO_W