|
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 | +--com.techtrader.modules.tools.bytecode.ClassInstruction
Represents an instruction that takes as an argument a Class to operate on. Examples include ANEWARRAY, CHECKCAST, INSTANCEOF, NEW.
Fields inherited from class com.techtrader.modules.tools.bytecode.Instruction |
_byteIndex,
_opcode,
_opcodeTypes,
_owner |
Constructor Summary | |
protected |
ClassInstruction(Code owner,
int opcode)
|
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)
ClassInstructions are equal if the type they reference is the same, or if the type of either is unset. |
int |
getClassIndex()
Get the constant pool index of the class for this instruction. |
String |
getClassName()
Get the nam of the class to operate on. |
Class |
getClassType()
Get the Class of the type to operate on. |
int |
getLength()
Return the length in bytes of this opcode, including all arguments. |
int |
getStackChange()
Return the number of stack positions this instruction pushes or pops during its execution. |
protected void |
readData(DataInput in)
Read the arguments for this opcode from the given stream. |
void |
setClassIndex(int index)
Set the constant pool index of the class for this instruction. |
ClassInstruction |
setClassName(String type)
Set the name of the class to operate on. |
Instruction |
setClassType(Class type)
Set the Class of the type to operate on. |
protected void |
writeData(DataOutput out)
Write the arguments for this opcode to the given stream. |
Methods inherited from class com.techtrader.modules.tools.bytecode.Instruction |
getByteIndex,
getName,
getOpCode,
getOwner,
invalidate,
setByteIndex,
setOpCode |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected ClassInstruction(Code owner, int opcode)
Method Detail |
public int getClassIndex()
public void setClassIndex(int index)
public ClassInstruction setClassName(String type)
public String getClassName()
public Instruction setClassType(Class type)
public Class getClassType() throws ClassNotFoundException
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 |