Class FieldInstruction

All Implemented Interfaces:
Serializable, Cloneable, Constants

public class FieldInstruction extends FieldOrMethod
Super class for the GET/PUTxxx family of instructions.
Version:
$Id: FieldInstruction.java,v 1.7 2009/10/05 17:35:36 aclement Exp $
Author:
M. Dahm
See Also:
Serialized Form
  • Constructor Details

    • FieldInstruction

      public FieldInstruction(short opcode, int index)
  • Method Details

    • toString

      public String toString(ConstantPool cp)
      Overrides:
      toString in class InstructionCP
      Returns:
      mnemonic for instruction with symbolic references resolved
    • getFieldSize

      protected int getFieldSize(ConstantPool cpg)
      Returns:
      size of field (1 or 2)
    • getType

      public Type getType(ConstantPool cpg)
      Overrides:
      getType in class InstructionCP
    • getFieldType

      public Type getFieldType(ConstantPool cpg)
    • getFieldName

      public String getFieldName(ConstantPool cpg)
    • produceStack

      public int produceStack(ConstantPool cpg)
      Overrides:
      produceStack in class Instruction
      Returns:
      Number of words produced onto stack by this instruction, or Constants.UNPREDICTABLE, if this can not be computed statically
    • consumeStack

      public int consumeStack(ConstantPool cpg)
      Overrides:
      consumeStack in class Instruction
      Returns:
      Number of words consumed from stack by this instruction, or Constants.UNPREDICTABLE, if this can not be computed statically