org.apache.bcel.generic

Class FieldInstruction

public abstract class FieldInstruction extends FieldOrMethod implements TypedInstruction

Super class for the GET/PUTxxx family of instructions.
Constructor Summary
protected FieldInstruction(short opcode, int index)
Method Summary
StringgetFieldName(ConstantPoolGen cpg)
protected intgetFieldSize(ConstantPoolGen cpg)
TypegetFieldType(ConstantPoolGen cpg)
TypegetType(ConstantPoolGen cpg)
StringtoString(ConstantPool cp)

Constructor Detail

FieldInstruction

protected FieldInstruction(short opcode, int index)

Parameters: index to constant pool

Method Detail

getFieldName

public String getFieldName(ConstantPoolGen cpg)

Returns: name of referenced field.

getFieldSize

protected int getFieldSize(ConstantPoolGen cpg)

Returns: size of field (1 or 2)

getFieldType

public Type getFieldType(ConstantPoolGen cpg)

Returns: type of field

getType

public Type getType(ConstantPoolGen cpg)

Returns: return type of referenced field

toString

public String toString(ConstantPool cp)

Returns: mnemonic for instruction with symbolic references resolved