IndexedInstruction
, TypedInstruction
IINC
, LoadInstruction
, StoreInstruction
public abstract class LocalVariableInstruction extends Instruction implements TypedInstruction, IndexedInstruction
Modifier and Type | Field | Description |
---|---|---|
protected int |
n |
length, opcode
Modifier | Constructor | Description |
---|---|---|
protected |
LocalVariableInstruction(short opcode,
short c_tag,
int n) |
Modifier and Type | Method | Description |
---|---|---|
void |
dump(java.io.DataOutputStream out) |
Dump instruction as byte code to stream out.
|
short |
getCanonicalTag() |
|
int |
getIndex() |
|
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 |
setIndex(int n) |
Set the local variable index
|
java.lang.String |
toString(boolean verbose) |
Long output format:
<name of opcode> "["<opcode number>"]"
"("<length of instruction>")" "<"< local variable index>">"
|
accept, consumeStack, copy, equals, getComparator, getLength, getName, getOpcode, produceStack, readInstruction, setComparator, toString, toString
protected LocalVariableInstruction(short opcode, short c_tag, int n)
opcode
- Instruction opcodec_tag
- Instruction number for compact version, ALOAD_0, e.g.n
- local variable index (unsigned short)public void dump(java.io.DataOutputStream out) throws java.io.IOException
dump
in class Instruction
out
- Output streamjava.io.IOException
public java.lang.String toString(boolean verbose)
toString
in class Instruction
verbose
- long/short format switchprotected void initFromFile(ByteSequence bytes, boolean wide) throws java.io.IOException
initFromFile
in class Instruction
bytes
- byte sequence to read fromwide
- "wide" instruction flagjava.io.IOException
public final int getIndex()
getIndex
in interface IndexedInstruction
public void setIndex(int n)
setIndex
in interface IndexedInstruction
public short getCanonicalTag()
public Type getType(ConstantPoolGen cp)
getType
in interface TypedInstruction