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

public Class IINC

extends LocalVariableInstruction
Class Inheritance
Imports
java.io.DataOutputStream, .IOException, com.sun.org.apache.bcel.internal.Const, com.sun.org.apache.bcel.internal.util.ByteSequence

IINC - Increment local variable by constant

Field Summary

Modifier and TypeField and Description
private int
c

private boolean
Inherited from com.sun.org.apache.bcel.internal.generic.LocalVariableInstruction:
n

Constructor Summary

AccessConstructor and Description
pack-priv
IINC()

Empty constructor needed for Instruction.readInstruction.

public
IINC(final int
index of local variable
n
,
final int
increment factor
c
)

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.

Calls corresponding visitor method(s).

public void
dump(final DataOutputStream
Output stream
out
)

Overrides com.sun.org.apache.bcel.internal.generic.LocalVariableInstruction.dump.

Dumps instruction as byte code to stream out.

public final int
getIncrement()

Returns: increment factor

public Type

Returns:

int type
getType
(final ConstantPoolGen cp)

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

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

Returns the type associated with the instruction - in case of ALOAD or ASTORE Type.OBJECT is returned.

protected void
initFromFile(final ByteSequence bytes, final boolean wide)

Overrides com.sun.org.apache.bcel.internal.generic.LocalVariableInstruction.initFromFile.

Reads needed data (e.g. index) from file.

public final void
setIncrement(final int c)

Sets increment factor.

public final void
private void
public String

Returns:

mnemonic for instruction.
toString
(final boolean verbose)

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

Returns mnemonic for instruction.

Inherited from com.sun.org.apache.bcel.internal.generic.LocalVariableInstruction:
getCanonicalTaggetIndexsetIndexOnly

Field Detail

cback to summary
private int c
wideback to summary
private boolean wide

Constructor Detail

IINCback to summary
pack-priv IINC()

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

IINCback to summary
public IINC(final int n, final int c)
Parameters
n:int

index of local variable

c:int

increment factor

Method Detail

acceptback to summary
public void accept(final Visitor v)

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

Calls 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
dumpback to summary
public void dump(final DataOutputStream out) throws IOException

Overrides com.sun.org.apache.bcel.internal.generic.LocalVariableInstruction.dump.

Dumps instruction as byte code to stream out.

Parameters
out:DataOutputStream

Output stream

Annotations
@Override
Exceptions
IOException:

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

Thrown when an I/O exception of some sort has occurred.

getIncrementback to summary
public final int getIncrement()
Returns:int

increment factor

getTypeback to summary
public Type getType(final ConstantPoolGen cp)

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

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

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

Returns the type associated with the instruction - in case of ALOAD or ASTORE Type.OBJECT is returned. This is just a bit incorrect, because ALOAD and ASTORE may work on every ReferenceType (including Type.NULL) and ASTORE may even work on a ReturnaddressType .

Returns:Type

int type

Annotations
@Override
initFromFileback to summary
protected void initFromFile(final ByteSequence bytes, final boolean wide) throws IOException

Overrides com.sun.org.apache.bcel.internal.generic.LocalVariableInstruction.initFromFile.

Reads needed data (e.g. index) from file.

Annotations
@Override
Exceptions
IOException:

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

may be thrown if the implementation needs to read data from the file

setIncrementback to summary
public final void setIncrement(final int c)

Sets increment factor.

setIndexback to summary
public final void setIndex(final int n)

Overrides com.sun.org.apache.bcel.internal.generic.LocalVariableInstruction.setIndex.

Implements com.sun.org.apache.bcel.internal.generic.IndexedInstruction.setIndex.

Sets index of local variable.

Annotations
@Override
setWideback to summary
private void setWide()
toStringback to summary
public String toString(final boolean verbose)

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

Returns mnemonic for instruction.

Returns:String

mnemonic for instruction.

Annotations
@Override