|
|||||||||
| 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 CmpInstruction

java.lang.Objectcom.techtrader.modules.tools.bytecode.Instruction
com.techtrader.modules.tools.bytecode.CmpInstruction
- All Implemented Interfaces:
- Constants, com.techtrader.modules.tools.bytecode.visitor.VisitAcceptor
- public class CmpInstruction
- extends Instruction
An instruction comparing two stack values that varies depending on the value type.
| Field Summary | |
private int |
_nan
|
private java.lang.Class |
_type
|
| Fields inherited from class com.techtrader.modules.tools.bytecode.Instruction |
_byteIndex, _opcode, _opcodeTypes, _owner |
| Constructor Summary | |
protected |
CmpInstruction(Code owner)
|
protected |
CmpInstruction(Code owner,
int opcode,
java.lang.Class type,
int nan)
|
| 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. |
private void |
calculateOpCode()
|
protected void |
copy(Instruction orig)
|
boolean |
equals(java.lang.Object other)
Two cmp instructions are equal if the type and NaN value they reference is equal or the type of either instruction is unset. |
int |
getNaNValue()
Get the number that will be placed on the stack if this instruction is of type float or double and one of the operands is NaN. |
int |
getStackChange()
Return the number of stack positions this instruction pushes or pops during its execution. |
java.lang.Class |
getType()
Get the type of value to operate on; this is one of: float, double, long. |
java.lang.String |
getTypeName()
Get the type of value to operate on; this is one of: float, double, long. |
void |
setNaNValue(int nan)
Set the number that will be placed on the stack if this instruction is of type float or double and one of the operands is NaN. |
CmpInstruction |
setType(java.lang.Class type)
Set the type of value to operate on; primitives that have no direct support (byte, char, boolean, int) will be conerted to long.class. |
CmpInstruction |
setTypeName(java.lang.String name)
Set the type to load 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 |
| Field Detail |
_type
private java.lang.Class _type
_nan
private int _nan
| Constructor Detail |
CmpInstruction
protected CmpInstruction(Code owner)
CmpInstruction
protected CmpInstruction(Code owner, int opcode, java.lang.Class type, int nan)
| Method Detail |
getType
public java.lang.Class getType()
- Get the type of value to operate on; this is one of:
float, double, long.
getTypeName
public java.lang.String getTypeName()
- Get the type of value to operate on; this is one of:
float, double, long.
setType
public CmpInstruction setType(java.lang.Class type)
- Set the type of value to operate on; primitives that have no direct
support (byte, char, boolean, int) will be conerted to long.class.
setTypeName
public CmpInstruction setTypeName(java.lang.String name)
- Set the type to load by name.
getNaNValue
public int getNaNValue()
- Get the number that will be placed on the stack if this instruction
is of type float or double and one of the operands is NaN. The
return value will be either 1 or -1.
setNaNValue
public void setNaNValue(int nan)
- Set the number that will be placed on the stack if this instruction
is of type float or double and one of the operands is NaN. The
value must be either 1 or -1.
equals
public boolean equals(java.lang.Object other)
- Two cmp instructions are equal if the type and NaN value they
reference is equal or the type of either instruction is unset.
- Overrides:
equalsin 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
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
copy
protected void copy(Instruction orig)
- Overrides:
copyin classInstruction
calculateOpCode
private void calculateOpCode()
|
|||||||||
| 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