public abstract class LocalVariableInstruction extends Instruction implements TypedInstruction, IndexedInstruction
| Modifier and Type | Field and Description |
|---|---|
private short |
c_tag |
private short |
canon_tag |
protected int |
n
Deprecated.
(since 6.0) will be made private; do not access directly, use getter/setter
|
length, opcode| Modifier | Constructor and Description |
|---|---|
(package private) |
LocalVariableInstruction()
Empty constructor needed for Instruction.readInstruction.
|
(package private) |
LocalVariableInstruction(short canon_tag,
short c_tag)
Empty constructor needed for Instruction.readInstruction.
|
protected |
LocalVariableInstruction(short opcode,
short c_tag,
int n) |
| Modifier and Type | Method and 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.
|
(package private) void |
setIndexOnly(int n)
Sets the index of the referenced variable (n) only
|
java.lang.String |
toString(boolean verbose)
Long output format:
<name of opcode> "["<opcode number>"]"
"("<length of instruction>")" "<"< local variable index>">"
|
private boolean |
wide() |
accept, consumeStack, copy, dispose, equals, getComparator, getLength, getName, getOpcode, hashCode, isValidByte, isValidShort, produceStack, readInstruction, setComparator, setLength, setOpcode, toString, toString@Deprecated protected int n
private short c_tag
private short canon_tag
LocalVariableInstruction(short canon_tag,
short c_tag)
LocalVariableInstruction()
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)private boolean wide()
public void dump(java.io.DataOutputStream out)
throws java.io.IOException
dump in class Instructionout - Output streamjava.io.IOExceptionpublic java.lang.String toString(boolean verbose)
toString in class Instructionverbose - long/short format switchprotected void initFromFile(ByteSequence bytes, boolean wide) throws java.io.IOException
(ILOAD <= tag <= ALOAD_3) || (ISTORE <= tag <= ASTORE_3)
initFromFile in class Instructionbytes - byte sequence to read fromwide - "wide" instruction flagjava.io.IOException - may be thrown if the implementation needs to read data from the filepublic final int getIndex()
getIndex in interface IndexedInstructionpublic void setIndex(int n)
setIndex in interface IndexedInstructionsetIndexOnly(int)public short getCanonicalTag()
public Type getType(ConstantPoolGen cp)
getType in interface TypedInstructionfinal void setIndexOnly(int n)
setIndex(int)