|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectAsm
Datum
public class Datum
Datum represents a generic piece of data (a word or ascii directive).
| Field Summary | |
|---|---|
static int |
ASCIIZ
Constant for an ascii datum |
static int |
SPACE
Constant for an space datum |
static int |
WORD
Constant for a word datum |
| Fields inherited from class Asm |
|---|
addr, lineNumber |
| Constructor Summary | |
|---|---|
Datum(int datumType,
java.lang.String value,
int lineNumber)
Datum constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
getAsciizString()
Get the asciiz string (only applicable for ascii datum). |
int |
getSpaceSize()
Gets space size as an integer for the datum (note: space size is only applicable for space directives) See the ISA description for a list of operations and their respective operands. |
boolean |
getWordFlag()
Gets flag indicating whether word value is an immediate or label -- ultimately it needs to be converted to an int. |
java.lang.String |
getWordLabel()
Gets word label (string) for the datum (note: word label is only applicable for word directives) See the ISA description for a list of operations and their respective operands. |
int |
getWordValue()
Gets word value as an integer for the datum (note: word value is only applicable for word directives) See the ISA description for a list of operations and their respective operands. |
static boolean |
isAscii(java.lang.String directive)
Checks if directive is an ascii datum |
boolean |
isAsciiz()
Returns whether datum is an asciiz datum |
boolean |
isSpace()
Returns whether datum is a space datum |
static boolean |
isSpace(java.lang.String directive)
Checks if directive is a space datum |
boolean |
isWord()
Returns whether datum is a word datum |
static boolean |
isWord(java.lang.String directive)
Checks if directive is a word datum |
void |
setWordValue(int wordValue)
Sets the word value. |
| Methods inherited from class Asm |
|---|
getAddr, getLineNumber, setAddr |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int WORD
public static final int ASCIIZ
public static final int SPACE
| Constructor Detail |
|---|
public Datum(int datumType,
java.lang.String value,
int lineNumber)
datumType - type of datum (0 for word, 1 for asciiz, 2 for space).value - value of datum (as a string).lineNumber - line number of datum.| Method Detail |
|---|
public boolean getWordFlag()
public int getWordValue()
public java.lang.String getWordLabel()
public void setWordValue(int wordValue)
wordValue - word value as an integerpublic java.lang.String getAsciizString()
public int getSpaceSize()
public static boolean isWord(java.lang.String directive)
directive - string to check
public boolean isWord()
public static boolean isAscii(java.lang.String directive)
directive - string to check
public boolean isAsciiz()
public static boolean isSpace(java.lang.String directive)
directive - string to check
public boolean isSpace()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||