APIdia Launch Partner
Top Description Constructors Methods
com.sun.org.apache.bcel.internal.generic

public abstract Class FieldInstruction

extends FieldOrMethod
Class Inheritance
Known Direct Subclasses
com.sun.org.apache.bcel.internal.generic.GETFIELD, com.sun.org.apache.bcel.internal.generic.GETSTATIC, com.sun.org.apache.bcel.internal.generic.PUTFIELD, com.sun.org.apache.bcel.internal.generic.PUTSTATIC
Imports
com.sun.org.apache.bcel.internal.classfile.ConstantPool

Super class for the GET/PUTxxx family of instructions.

Constructor Summary

AccessConstructor and Description
pack-priv
FieldInstruction()

Empty constructor needed for Instruction.readInstruction.

protected
FieldInstruction(final short opcode, final int
to constant pool
index
)

Method Summary

Modifier and TypeMethod and Description
public String
getFieldName(final ConstantPoolGen cpg)

Returns: name of referenced field.

protected int
getFieldSize(final ConstantPoolGen cpg)

Returns: size of field (1 or 2)

public Type
getFieldType(final ConstantPoolGen cpg)

Returns: type of field

public Type
public String
toString(final ConstantPool cp)

Overrides com.sun.org.apache.bcel.internal.generic.CPInstruction.toString.

Returns: mnemonic for instruction with symbolic references resolved

Inherited from com.sun.org.apache.bcel.internal.generic.FieldOrMethod:
getClassNamegetClassTypegetLoadClassTypegetNamegetReferenceTypegetSignature

Constructor Detail

FieldInstructionback to summary
pack-priv FieldInstruction()

Empty constructor needed for Instruction.readInstruction. Not to be used otherwise.

FieldInstructionback to summary
protected FieldInstruction(final short opcode, final int index)
Parameters
index:int

to constant pool

Method Detail

getFieldNameback to summary
public String getFieldName(final ConstantPoolGen cpg)
Returns:String

name of referenced field.

getFieldSizeback to summary
protected int getFieldSize(final ConstantPoolGen cpg)
Returns:int

size of field (1 or 2)

getFieldTypeback to summary
public Type getFieldType(final ConstantPoolGen cpg)
Returns:Type

type of field

getTypeback to summary
public Type getType(final ConstantPoolGen cpg)

Overrides com.sun.org.apache.bcel.internal.generic.CPInstruction.getType.

Implements com.sun.org.apache.bcel.internal.generic.LoadClass.getType, com.sun.org.apache.bcel.internal.generic.TypedInstruction.getType.

Doc from com.sun.org.apache.bcel.internal.generic.LoadClass.getType.

Returns the type associated with this instruction. LoadClass instances are always typed, but this type does not always refer to the type of the class or interface that it possibly forces to load. For example, GETFIELD would return the type of the field and not the type of the class where the field is defined. If no class is forced to be loaded, null is returned. An example for this is an NEWARRAY instruction that creates an int[][].

Returns:Type

return type of referenced field

Annotations
@Override
toStringback to summary
public String toString(final ConstantPool cp)

Overrides com.sun.org.apache.bcel.internal.generic.CPInstruction.toString.

Returns:String

mnemonic for instruction with symbolic references resolved

Annotations
@Override