avrora.core
Interface Operand.Constant

All Superinterfaces:
Operand
All Known Implementing Classes:
SyntacticOperand.Expr
Enclosing interface:
Operand

public static interface Operand.Constant
extends Operand

The Operand.Constant class encapsulates the notion of a constant operand to an instruction.


Nested Class Summary
 
Nested classes inherited from class avrora.core.Operand
Operand.Constant, Operand.Register
 
Method Summary
 int getValue()
          The getvalue() method returns the integer value of this constant operand.
 int getValueAsWord()
          The getValueAsWord() method returns the value of this constant operand as word-aligned; meaning, for addresses, it will divide by 2, but for immediate constants it will not.
 
Methods inherited from interface avrora.core.Operand
asConstant, asRegister
 

Method Detail

getValue

public int getValue()
The getvalue() method returns the integer value of this constant operand.

Returns:
an integer representation of the value

getValueAsWord

public int getValueAsWord()
The getValueAsWord() method returns the value of this constant operand as word-aligned; meaning, for addresses, it will divide by 2, but for immediate constants it will not.

Returns:
an integer representation of the value, word-aligned if it is an address