FileDocCategorySizeDatePackage
FieldInstruction.javaAPI DocJava SE 5 API4489Fri Aug 26 14:55:20 BST 2005com.sun.org.apache.bcel.internal.generic

FieldInstruction

public abstract class FieldInstruction extends FieldOrMethod implements TypedInstruction
Super class for the GET/PUTxxx family of instructions.
version
$Id: FieldInstruction.java,v 1.1.1.1 2001/10/29 20:00:12 jvanzyl Exp $
author
M. Dahm

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

protected FieldInstruction(short opcode, int index)

param
index to constant pool

    super(opcode, index);
  
Methods Summary
public java.lang.StringgetFieldName(com.sun.org.apache.bcel.internal.generic.ConstantPoolGen cpg)

return
name of referenced field.

    return getName(cpg);
  
protected intgetFieldSize(com.sun.org.apache.bcel.internal.generic.ConstantPoolGen cpg)

return
size of field (1 or 2)

    return getType(cpg).getSize();
  
public com.sun.org.apache.bcel.internal.generic.TypegetFieldType(com.sun.org.apache.bcel.internal.generic.ConstantPoolGen cpg)

return
type of field

    return Type.getType(getSignature(cpg));
  
public com.sun.org.apache.bcel.internal.generic.TypegetType(com.sun.org.apache.bcel.internal.generic.ConstantPoolGen cpg)

return
return type of referenced field

    return getFieldType(cpg);
  
public java.lang.StringtoString(com.sun.org.apache.bcel.internal.classfile.ConstantPool cp)

return
mnemonic for instruction with symbolic references resolved

    return com.sun.org.apache.bcel.internal.Constants.OPCODE_NAMES[opcode] + " " +
      cp.constantToString(index, com.sun.org.apache.bcel.internal.Constants.CONSTANT_Fieldref);