org.apache.bcel.generic

Class IINC

public class IINC extends LocalVariableInstruction

IINC - Increment local variable by constant

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

Author: M. Dahm

Field Summary
intc
booleanwide
Constructor Summary
IINC()
Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction().
IINC(int n, int c)
Method Summary
voidaccept(Visitor v)
Call corresponding visitor method(s).
voiddump(DataOutputStream out)
Dump instruction as byte code to stream out.
intgetIncrement()
TypegetType(ConstantPoolGen cp)
protected voidinitFromFile(ByteSequence bytes, boolean wide)
Read needed data (e.g. index) from file.
voidsetIncrement(int c)
Set increment factor.
voidsetIndex(int n)
Set index of local variable.
voidsetWide()
StringtoString(boolean verbose)

Field Detail

c

private int c

wide

private boolean wide

Constructor Detail

IINC

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

IINC

public IINC(int n, int c)

Parameters: n index of local variable c increment factor

Method Detail

accept

public void accept(Visitor v)
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 object

dump

public void dump(DataOutputStream out)
Dump instruction as byte code to stream out.

Parameters: out Output stream

getIncrement

public final int getIncrement()

Returns: increment factor

getType

public Type getType(ConstantPoolGen cp)

Returns: int type

initFromFile

protected void initFromFile(ByteSequence bytes, boolean wide)
Read needed data (e.g. index) from file.

setIncrement

public final void setIncrement(int c)
Set increment factor.

setIndex

public final void setIndex(int n)
Set index of local variable.

setWide

private final void setWide()

toString

public String toString(boolean verbose)

Returns: mnemonic for instruction