Class LConstInstruction


  • public class LConstInstruction
    extends Instruction
    Represents the LCONST_* instructions (0x09 and 0x0A).
    • Constructor Detail

      • LConstInstruction

        public LConstInstruction​(int opcode,
                                 int offset,
                                 long value)
        Constructs an LConstInstruction.
        Parameters:
        opcode - The opcode of the instruction.
        offset - The bytecode offset of the instruction.
        value - The long constant value.
    • Method Detail

      • getValue

        public long getValue()
        Returns:
        the value
      • getStackChange

        public int getStackChange()
        Returns the change in stack size caused by this instruction.
        Specified by:
        getStackChange in class Instruction
        Returns:
        The stack size change (pushes a long, which occupies two stack slots).
      • getLocalChange

        public int getLocalChange()
        Returns the change in local variables caused by this instruction.
        Specified by:
        getLocalChange in class Instruction
        Returns:
        The local variables size change (none).
      • toString

        public String toString()
        Returns a string representation of the instruction.
        Overrides:
        toString in class Instruction
        Returns:
        The mnemonic and value of the instruction.