|
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.ConvertInstruction
Represents one of the conversion opcodes defined in the
Constants
interface for converting between primitive types.
Changing the types of the instruction will automatically
update the underlying opcode. If converting from one type to the same
type will result in a NOP. Note that the result of conversions not
supported directly by the JVM (i.e. char to double) is undefined.
Fields inherited from class com.techtrader.modules.tools.bytecode.Instruction |
_byteIndex,
_opcode,
_opcodeTypes,
_owner |
Constructor Summary | |
protected |
ConvertInstruction(Code owner)
|
protected |
ConvertInstruction(Code owner,
int opcode,
Class from,
Class to)
|
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)
ConvertInstructions are equal if they convert between the same types, or the types of either is unset. |
Class |
getFromType()
Get the type of being converted from; will be one of: int, float, double, long. |
String |
getFromTypeName()
Get the type of being converted from; will be one of: int, float, double, long. |
int |
getStackChange()
Return the number of stack positions this instruction pushes or pops during its execution. |
Class |
getToType()
Get the type being converted to; will be one of: int, float, double, long, byte, char, short. |
String |
getToTypeName()
Get the type being converted to; will be one of: int, float, double, long, byte, char, short. |
ConvertInstruction |
setFromType(Class type)
Set the type to convert from. |
ConvertInstruction |
setFromTypeName(String name)
Set the type to convert from by name. |
ConvertInstruction |
setToType(Class type)
Set the type to convert to. |
ConvertInstruction |
setToTypeName(String name)
Set the type to convert to by name. |
Methods inherited from class com.techtrader.modules.tools.bytecode.Instruction |
getByteIndex,
getLength,
getName,
getOpCode,
getOwner,
invalidate,
readData,
setByteIndex,
setOpCode,
writeData |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected ConvertInstruction(Code owner)
protected ConvertInstruction(Code owner, int opcode, Class from, Class to)
Method Detail |
public Class getFromType()
public String getFromTypeName()
public ConvertInstruction setFromType(Class type)
public ConvertInstruction setFromTypeName(String name)
setFromType(java.lang.Class)
public Class getToType()
public String getToTypeName()
public ConvertInstruction setToType(Class type)
public ConvertInstruction setToTypeName(String name)
setToType(java.lang.Class)
public boolean equals(Object other)
public int getStackChange()
protected void copy(Instruction orig)
public void acceptVisit(BCVisitor visit)
|
TechTrader Bytecode Toolkit | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |