Top Description Constructors Methods
org.apache.bcel.generic

public Class PUTFIELD

extends FieldInstruction
implements PopInstruction, ExceptionThrower
Class Inheritance
All Implemented Interfaces
org.apache.bcel.generic.ExceptionThrower, org.apache.bcel.generic.PopInstruction, org.apache.bcel.generic.StackConsumer
Imports
org.apache.bcel.Const, .ExceptionConst

PUTFIELD - Put field in object
Stack: ..., objectref, value -> ...
OR
Stack: ..., objectref, value.word1, value.word2 -> ...

Constructor Summary

AccessConstructor and Description
pack-priv
PUTFIELD()

Empty constructor needed for Instruction.readInstruction.

public
PUTFIELD(final int index)

Method Summary

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

Implements abstract org.apache.bcel.generic.Instruction.accept.

Call corresponding visitor method(s).
public int
consumeStack(final ConstantPoolGen cpg)

Overrides org.apache.bcel.generic.Instruction.consumeStack.

Implements org.apache.bcel.generic.StackConsumer.consumeStack.

This method also gives right results for instructions whose effect on the stack depends on the constant pool entry they reference.
public Class<?>[]
Inherited from org.apache.bcel.generic.FieldInstruction:
getFieldNamegetFieldSizegetFieldTypegetTypetoString

Constructor Detail

PUTFIELDback to summary
pack-priv PUTFIELD()

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

PUTFIELDback to summary
public PUTFIELD(final int index)

Method Detail

acceptback to summary
public void accept(final Visitor v)

Implements abstract org.apache.bcel.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
consumeStackback to summary
public int consumeStack(final ConstantPoolGen cpg)

Overrides org.apache.bcel.generic.Instruction.consumeStack.

Implements org.apache.bcel.generic.StackConsumer.consumeStack.

Doc from org.apache.bcel.generic.Instruction.consumeStack.

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 org.apache.bcel.generic.StackConsumer.consumeStack.

how many words are consumed from stack

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

Implements org.apache.bcel.generic.ExceptionThrower.getExceptions.

Annotations
@Override