|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The Operand class encapsulates the notion of an operand to
an instruction. An operand can be either a register or a constant integer.
Whether the register is a source or destination register depends on the
particular instruction. Likewise, whether the integer represents an
immediate, an offset, or an address depends on the instruction.
Operands are used as the arguments to the constructors of instructions.
InstrPrototype| Nested Class Summary | |
static interface |
Operand.Constant
The Operand.Constant class encapsulates the notion of a
constant operand to an instruction. |
static interface |
Operand.Register
The Operand.Register class encapsulates the notion of a
register operand to an instruction. |
| Method Summary | |
Operand.Constant |
asConstant()
The asConstant() method uses virtual dispatch to avoid a
cast. |
Operand.Register |
asRegister()
The asRegister() method uses virtual dispatch to avoid a
cast. |
| Method Detail |
public Operand.Register asRegister()
asRegister() method uses virtual dispatch to avoid a
cast. If this operand is an instance of Operand.Register it
will return itself. Otherwise, it will return null.
Operand.Register; null
otherwisepublic Operand.Constant asConstant()
asConstant() method uses virtual dispatch to avoid a
cast. If this operand is an instance of Operand.Constant it
will return itself. Otherwise, it will return null.
Operand.Constant; null
otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||