org.apache.bcel.generic

Class FieldInstruction

public abstract class FieldInstruction extends FieldOrMethod implements TypedInstruction

Super class for the GET/PUTxxx family of instructions.

Version: $Id: FieldInstruction.java 386056 2006-03-15 11:31:56Z tcurdt $

Author: M. Dahm

Constructor Summary
FieldInstruction()
Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction().
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

FieldInstruction()
Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction(). Not to be used otherwise.

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