Class FieldInstruction

    • Constructor Detail

      • FieldInstruction

        FieldInstruction()
        Empty constructor needed for Instruction.readInstruction. Not to be used otherwise.
      • FieldInstruction

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

      • getFieldName

        public java.lang.String getFieldName​(ConstantPoolGen cpg)
        Gets the name of referenced field.
        Parameters:
        cpg - the constant pool generator.
        Returns:
        name of referenced field.
      • getFieldSize

        protected int getFieldSize​(ConstantPoolGen cpg)
        Gets the size of field.
        Parameters:
        cpg - the constant pool generator.
        Returns:
        size of field (1 or 2).
      • getFieldType

        public Type getFieldType​(ConstantPoolGen cpg)
        Gets the type of field.
        Parameters:
        cpg - the constant pool generator.
        Returns:
        type of field.
      • 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 CPInstruction
        Parameters:
        cp - the constant pool.
        Returns:
        mnemonic for instruction with symbolic references resolved.