类 SimpleInstruction


  • public class SimpleInstruction
    extends Instruction
    This Instruction represents a simple instruction without variable arguments or constant pool references.
    • 字段详细资料

      • constant

        public int constant
    • 构造器详细资料

      • SimpleInstruction

        public SimpleInstruction()
        Creates an uninitialized SimpleInstruction.
      • SimpleInstruction

        public SimpleInstruction​(byte opcode)
        Creates a new SimpleInstruction with the given opcode. Automatically extracts any embedded constant.
      • SimpleInstruction

        public SimpleInstruction​(byte opcode,
                                 int constant)
        Creates a new SimpleInstruction with the given opcode and constant. Automatically adapts the opcode if it has an embedded constant and the constant lies within the supported range. If the constant doesn't lie within the supported range, it must be adapted before the instruction can be written out.
    • 方法详细资料

      • copy

        public SimpleInstruction copy​(SimpleInstruction simpleInstruction)
        Copies the given instruction into this instruction.
        参数:
        simpleInstruction - the instruction to be copied.
        返回:
        this instruction.
      • canonicalOpcode

        public byte canonicalOpcode()
        从类复制的说明: Instruction
        Returns the canonical opcode of this instruction, i.e. typically the opcode whose extension has been removed.
        覆盖:
        canonicalOpcode 在类中 Instruction
      • shrink

        public Instruction shrink()
        从类复制的说明: Instruction
        Shrinks this instruction to its shortest possible form.
        指定者:
        shrink 在类中 Instruction
        返回:
        this instruction.
      • readInfo

        protected void readInfo​(byte[] code,
                                int offset)
        从类复制的说明: Instruction
        Reads the data following the instruction opcode.
        指定者:
        readInfo 在类中 Instruction
      • writeInfo

        protected void writeInfo​(byte[] code,
                                 int offset)
        从类复制的说明: Instruction
        Writes data following the instruction opcode.
        指定者:
        writeInfo 在类中 Instruction
      • length

        public int length​(int offset)
        从类复制的说明: Instruction
        Returns the length in bytes of the instruction.
        指定者:
        length 在类中 Instruction
      • stackEntryIndexBefore

        public int stackEntryIndexBefore​(Clazz clazz,
                                         int stackEntryIndexAfter)
        从类复制的说明: Instruction
        Returns the stack entry index from which the specified stack entry is copied by a dup/swap/checkcast instruction, or -1 otherwise. Stack entry indices are counted from the top of the stack.
        • checkcast: after: 0 (before: 0 ) -- not anymore
        • dup: after: 0 0 (before: 0 )
        • dup_x1: after: 0 1 0 (before: 1 0 )
        • dup_x2: after: 0 2 1 0 (before: 2 1 0 )
        • dup2: after: 1 0 1 0 (before: 1 0 )
        • dup2_x1: after: 1 0 2 1 0 (before: 2 1 0 )
        • dup2_x2: after: 1 0 3 2 1 0 (before: 3 2 1 0)
        覆盖:
        stackEntryIndexBefore 在类中 Instruction
      • toString

        public java.lang.String toString()
        覆盖:
        toString 在类中 java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        指定者:
        equals 在类中 Instruction