Class WideIIncInstruction

    • Constructor Detail

      • WideIIncInstruction

        public WideIIncInstruction​(int opcode,
                                   int offset,
                                   int varIndex,
                                   int constValue)
        Constructs a WideIIncInstruction.
        Parameters:
        opcode - The WIDE opcode (0xC4).
        offset - The bytecode offset where WIDE starts.
        varIndex - The two-byte local variable index.
        constValue - The two-byte constant increment.
    • Method Detail

      • getVarIndex

        public int getVarIndex()
        Returns the local variable index to be incremented.
        Specified by:
        getVarIndex in interface LocalVarInstruction
        Returns:
        The variable index.
      • getConstValue

        public int getConstValue()
        Returns the constant value by which the local variable is incremented.
        Returns:
        The constant increment value.
      • write

        public void write​(DataOutputStream dos)
                   throws IOException
        Writes the WIDE IINC opcode and its operands to the DataOutputStream.
        Specified by:
        write in class Instruction
        Parameters:
        dos - The DataOutputStream to write to.
        Throws:
        IOException - If an I/O error occurs.
      • 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 (none).
      • 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 instruction details.