java.lang.Object
Compil3r.BytecodeAnalysis.Bytecodes.Instruction
Compil3r.BytecodeAnalysis.Bytecodes.LocalVariableInstruction
- All Implemented Interfaces:
- Bytecodes.IndexedInstruction, Bytecodes.TypedInstruction, java.lang.Cloneable, java.io.Serializable
- Direct Known Subclasses:
- Bytecodes.IINC, Bytecodes.LoadInstruction, Bytecodes.StoreInstruction
- Enclosing class:
- Bytecodes
- public abstract static class Bytecodes.LocalVariableInstruction
- extends Bytecodes.Instruction
- implements Bytecodes.TypedInstruction, Bytecodes.IndexedInstruction
n
protected int n
c_tag
private short c_tag
canon_tag
private short canon_tag
Bytecodes.LocalVariableInstruction
Bytecodes.LocalVariableInstruction(short canon_tag,
short c_tag)
- Empty constructor needed for the Class.newInstance() statement in
Instruction.readInstruction(). Not to be used otherwise.
tag and length are defined in readInstruction and initFromFile, respectively.
Bytecodes.LocalVariableInstruction
Bytecodes.LocalVariableInstruction()
- Empty constructor needed for the Class.newInstance() statement in
Instruction.readInstruction(). Also used by IINC()!
Bytecodes.LocalVariableInstruction
protected Bytecodes.LocalVariableInstruction(short opcode,
short c_tag,
int n)
wide
private final boolean wide()
dump
public void dump(java.io.DataOutputStream out)
throws java.io.IOException
- Dump instruction as byte code to stream out.
- Overrides:
dump in class Bytecodes.Instruction
toString
public java.lang.String toString(boolean verbose)
- Long output format:
<name of opcode> "["<opcode number>"]"
"("<length of instruction>")" "<"< local variable index>">"
- Overrides:
toString in class Bytecodes.Instruction
initFromFile
protected void initFromFile(Clazz.jq_ConstantPool cp,
Util.IO.ByteSequence bytes,
boolean wide)
throws java.io.IOException
- Read needed data (e.g. index) from file.
PRE: (ILOAD <= tag <= ALOAD_3) || (ISTORE <= tag <= ASTORE_3)
- Overrides:
initFromFile in class Bytecodes.Instruction
getIndex
public final int getIndex()
- Specified by:
getIndex in interface Bytecodes.IndexedInstruction
setIndex
public void setIndex(int n)
- Set the local variable index
- Specified by:
setIndex in interface Bytecodes.IndexedInstruction
getCanonicalTag
public short getCanonicalTag()
getType
public final Clazz.jq_Type 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 .
- Specified by:
getType in interface Bytecodes.TypedInstruction