|
|||||||||
| Home >> All >> com >> techtrader >> modules >> tools >> [ bytecode overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.techtrader.modules.tools.bytecode
Class ClassInstruction

java.lang.Objectcom.techtrader.modules.tools.bytecode.Instruction
com.techtrader.modules.tools.bytecode.ClassInstruction
- All Implemented Interfaces:
- Constants, com.techtrader.modules.tools.bytecode.visitor.VisitAcceptor
- Direct Known Subclasses:
- MultiANewArrayInstruction
- public class ClassInstruction
- extends Instruction
Represents an instruction that takes as an argument a Class to operate on. Examples include ANEWARRAY, CHECKCAST, INSTANCEOF, NEW.
| Field Summary | |
private int |
_index
|
| 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(com.techtrader.modules.tools.bytecode.visitor.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(java.lang.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. |
java.lang.String |
getClassName()
Get the nam of the class to operate on. |
java.lang.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(java.io.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(java.lang.String type)
Set the name of the class to operate on. |
Instruction |
setClassType(java.lang.Class type)
Set the Class of the type to operate on. |
protected void |
writeData(java.io.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 |
| Field Detail |
_index
private int _index
| Constructor Detail |
ClassInstruction
protected ClassInstruction(Code owner, int opcode)
| Method Detail |
getClassIndex
public int getClassIndex()
- Get the constant pool index of the class for this instruction.
setClassIndex
public void setClassIndex(int index)
- Set the constant pool index of the class for this instruction.
setClassName
public ClassInstruction setClassName(java.lang.String type)
- Set the name of the class to operate on.
getClassName
public java.lang.String getClassName()
- Get the nam of the class to operate on.
setClassType
public Instruction setClassType(java.lang.Class type)
- Set the Class of the type to operate on.
getClassType
public java.lang.Class getClassType() throws java.lang.ClassNotFoundException
- Get the Class of the type to operate on.
getLength
public int getLength()
- Description copied from class:
Instruction - Return the length in bytes of this opcode, including all arguments.
This method should be overridden by opcodes that take arguments.
- Overrides:
getLengthin classInstruction
getStackChange
public int getStackChange()
- Description copied from class:
Instruction - Return the number of stack positions this instruction pushes
or pops during its execution.
- Overrides:
getStackChangein classInstruction
equals
public boolean equals(java.lang.Object other)
- ClassInstructions are equal if the type they reference is the same,
or if the type of either is unset.
- Overrides:
equalsin classInstruction
copy
protected void copy(Instruction orig)
- Overrides:
copyin classInstruction
readData
protected void readData(java.io.DataInput in) throws java.io.IOException
- Description copied from class:
Instruction - Read the arguments for this opcode from the given stream.
This method should be overridden by opcodes that take arguments.
- Overrides:
readDatain classInstruction
writeData
protected void writeData(java.io.DataOutput out) throws java.io.IOException
- Description copied from class:
Instruction - Write the arguments for this opcode to the given stream.
This method should be overridden by opcodes that take arguments.
- Overrides:
writeDatain classInstruction
acceptVisit
public void acceptVisit(com.techtrader.modules.tools.bytecode.visitor.BCVisitor visit)
- Description copied from interface:
com.techtrader.modules.tools.bytecode.visitor.VisitAcceptor - 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.
- Specified by:
acceptVisitin interfacecom.techtrader.modules.tools.bytecode.visitor.VisitAcceptor- Overrides:
acceptVisitin classInstruction
|
|||||||||
| Home >> All >> com >> techtrader >> modules >> tools >> [ bytecode overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC