Class MethodReturnInstruction


  • public class MethodReturnInstruction
    extends Instruction
    Represents the return instructions (IRETURN, LRETURN, FRETURN, DRETURN, ARETURN, RETURN).
    • Constructor Detail

      • MethodReturnInstruction

        public MethodReturnInstruction​(int opcode,
                                       int offset)
        Constructs a MethodReturnInstruction.
        Parameters:
        opcode - The opcode of the instruction.
        offset - The bytecode offset of the instruction.
    • Method Detail

      • 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 (pops the return value from the stack).
      • 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).
      • getType

        public ReturnType getType()
        Returns the type of return operation.
        Returns:
        The ReturnType enum value.
      • toString

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