Class CPInstruction

    • Field Detail

      • index

        @Deprecated
        protected int index
        Deprecated.
        (since 6.0) will be made private; do not access directly, use getter/setter
    • Constructor Detail

      • CPInstruction

        protected CPInstruction​(short opcode,
                                int index)
        Constructs a CPInstruction.
        Parameters:
        opcode - The opcode.
        index - to constant pool.
    • Method Detail

      • dump

        public void dump​(java.io.DataOutputStream out)
                  throws java.io.IOException
        Dumps instruction as byte code to stream out.
        Overrides:
        dump in class Instruction
        Parameters:
        out - Output stream.
        Throws:
        java.io.IOException - Thrown when an I/O exception of some sort has occurred.
      • initFromFile

        protected void initFromFile​(ByteSequence bytes,
                                    boolean wide)
                             throws java.io.IOException
        Reads needed data (that is, index) from file.
        Overrides:
        initFromFile in class Instruction
        Parameters:
        bytes - input stream.
        wide - wide prefix?.
        Throws:
        java.io.IOException - Thrown if the implementation needs to read data from the file
      • toString

        public java.lang.String toString​(boolean verbose)
        Long output format: <name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"< constant pool index>">"
        Overrides:
        toString in class Instruction
        Parameters:
        verbose - long/short format switch.
        Returns:
        mnemonic for instruction.
      • toString

        public java.lang.String toString​(ConstantPool cp)
        Description copied from class: Instruction
        Gets the mnemonic for instruction with symbolic references resolved.
        Overrides:
        toString in class Instruction
        Parameters:
        cp - The constant pool.
        Returns:
        mnemonic for instruction with symbolic references resolved.