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

public Class GETFIELD

extends FieldInstruction
implements ExceptionThrower, StackConsumer, StackProducer
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.bcel.internal.generic.StackProducer, com.sun.org.apache.bcel.internal.generic.StackConsumer, com.sun.org.apache.bcel.internal.generic.ExceptionThrower
Imports
com.sun.org.apache.bcel.internal.Const, .ExceptionConst

GETFIELD - Fetch field from object
Stack: ..., objectref -> ..., value
OR
Stack: ..., objectref -> ..., value.word1, value.word2

Constructor Summary

AccessConstructor and Description
pack-priv
GETFIELD()

Empty constructor needed for Instruction.readInstruction.

public
GETFIELD(final int index)

Method Summary

Modifier and TypeMethod and Description
public void
accept(final Visitor
Visitor object
v
)

Implements abstract com.sun.org.apache.bcel.internal.generic.Instruction.accept.

Call corresponding visitor method(s).
public Class<?>[]
public int
produceStack(final ConstantPoolGen cpg)

Overrides com.sun.org.apache.bcel.internal.generic.Instruction.produceStack.

Implements com.sun.org.apache.bcel.internal.generic.StackProducer.produceStack.

This method also gives right results for instructions whose effect on the stack depends on the constant pool entry they reference.
Inherited from com.sun.org.apache.bcel.internal.generic.FieldInstruction:
getFieldNamegetFieldSizegetFieldTypegetTypetoString

Constructor Detail

GETFIELDback to summary
pack-priv GETFIELD()

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

GETFIELDback to summary
public GETFIELD(final int index)

Method Detail

acceptback to summary
public void accept(final Visitor v)

Implements abstract com.sun.org.apache.bcel.internal.generic.Instruction.accept.

Call corresponding visitor method(s). The order is: Call visitor methods of implemented interfaces first, then call methods according to the class hierarchy in descending order, i.e., the most specific visitXXX() call comes last.

Parameters
v:Visitor

Visitor object

Annotations
@Override
getExceptionsback to summary
public Class<?>[] getExceptions()

Implements com.sun.org.apache.bcel.internal.generic.ExceptionThrower.getExceptions.

Annotations
@Override
produceStackback to summary
public int produceStack(final ConstantPoolGen cpg)

Overrides com.sun.org.apache.bcel.internal.generic.Instruction.produceStack.

Implements com.sun.org.apache.bcel.internal.generic.StackProducer.produceStack.

Doc from com.sun.org.apache.bcel.internal.generic.Instruction.produceStack.

This method also gives right results for instructions whose effect on the stack depends on the constant pool entry they reference.

Returns:int

Doc from com.sun.org.apache.bcel.internal.generic.StackProducer.produceStack.

how many words are produced on stack

Annotations
@Override