|
TechTrader Bytecode Toolkit | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.techtrader.modules.tools.bytecode.Instruction
An Instruction represents an opcode in a method of a Class.
Field Summary | |
protected int |
_byteIndex
|
protected int |
_opcode
|
protected static List |
_opcodeTypes
|
protected Code |
_owner
|
Constructor Summary | |
protected |
Instruction(Code owner)
Protected constructor. |
Method Summary | |
void |
acceptVisit(BCVisitor visit)
Accept a visit from a BCVisitor, calling the appropriate methods to notify the visitor that it has entered this entity, and to provide it with the proper callbacks for each sub-entity owned by this object. |
protected void |
copy(Instruction orig)
|
boolean |
equals(Object other)
Instructions are equal if their opcodes are the same. |
int |
getByteIndex()
Get the index in the method code byte block at which this opcode starts. |
int |
getLength()
Return the length in bytes of this opcode, including all arguments. |
String |
getName()
Get the name of this opcode. |
int |
getOpCode()
Get the opcode this instruction represents. |
Code |
getOwner()
Get the Code block that owns this Instruction. |
int |
getStackChange()
Return the number of stack positions this instruction pushes or pops during its execution. |
protected void |
invalidate()
Used when the Instruction is removed from the code block so that it can no longer affect the constant pool. |
protected void |
readData(DataInput in)
Read the arguments for this opcode from the given stream. |
void |
setByteIndex(int index)
Set the index in the method code byte block at which this opcode starts. |
protected void |
setOpCode(int opcode)
Set the opcode this instruction represents. |
protected void |
writeData(DataOutput out)
Write the arguments for this opcode to the given stream. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static final List _opcodeTypes
protected Code _owner
protected int _opcode
protected int _byteIndex
Constructor Detail |
protected Instruction(Code owner)
Method Detail |
public Code getOwner()
protected void invalidate()
public String getName()
public int getOpCode()
protected void setOpCode(int opcode)
public void setByteIndex(int index)
public int getByteIndex()
public int getLength()
public int getStackChange()
public boolean equals(Object other)
protected void copy(Instruction orig)
protected void readData(DataInput in) throws IOException
protected void writeData(DataOutput out) throws IOException
public void acceptVisit(BCVisitor visit)
|
TechTrader Bytecode Toolkit | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |