org.apache.bcel.generic
public class IINC extends LocalVariableInstruction
Modifier and Type | Field and Description |
---|---|
private int |
c |
private boolean |
wide |
n
length, opcode
Constructor and Description |
---|
IINC()
Empty constructor needed for the Class.newInstance() statement in
Instruction.readInstruction().
|
IINC(int n,
int c) |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor v)
Call corresponding visitor method(s).
|
void |
dump(DataOutputStream out)
Dump instruction as byte code to stream out.
|
int |
getIncrement() |
Type |
getType(ConstantPoolGen cp)
Returns the type associated with the instruction -
in case of ALOAD or ASTORE Type.OBJECT is returned.
|
protected void |
initFromFile(ByteSequence bytes,
boolean wide)
Read needed data (e.g.
|
void |
setIncrement(int c)
Set increment factor.
|
void |
setIndex(int n)
Set index of local variable.
|
private void |
setWide() |
String |
toString(boolean verbose)
Long output format:
<name of opcode> "["<opcode number>"]"
"("<length of instruction>")" "<"< local variable index>">"
|
getCanonicalTag, getIndex
consumeStack, copy, dispose, equals, getComparator, getLength, getName, getOpcode, produceStack, readInstruction, setComparator, toString, toString
IINC()
public IINC(int n, int c)
n
- index of local variablec
- increment factorpublic void dump(DataOutputStream out) throws IOException
dump
in class LocalVariableInstruction
out
- Output streamIOException
private final void setWide()
protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
initFromFile
in class LocalVariableInstruction
bytes
- byte sequence to read fromwide
- "wide" instruction flagIOException
public String toString(boolean verbose)
LocalVariableInstruction
toString
in class LocalVariableInstruction
verbose
- long/short format switchpublic final void setIndex(int n)
setIndex
in interface IndexedInstruction
setIndex
in class LocalVariableInstruction
public final int getIncrement()
public final void setIncrement(int c)
public Type getType(ConstantPoolGen cp)
LocalVariableInstruction
getType
in interface TypedInstruction
getType
in class LocalVariableInstruction
public void accept(Visitor v)
accept
in class Instruction
v
- Visitor object