|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmars.assembler.Symbol
public class Symbol
Represents a MIPS program identifier to be stored in the symbol table.
Field Summary | |
---|---|
static boolean |
DATA_SYMBOL
|
static boolean |
TEXT_SYMBOL
|
Constructor Summary | |
---|---|
Symbol(String name,
int address,
boolean data)
Basic constructor, creates a symbol object. |
Method Summary | |
---|---|
int |
getAddress()
Returns the address of the the Symbol. |
String |
getName()
Returns the label of the the Symbol. |
boolean |
getType()
Finds the type of symbol, text or data. |
void |
setAddress(int newAddress)
Sets (replaces) the address of the the Symbol. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean TEXT_SYMBOL
public static final boolean DATA_SYMBOL
Constructor Detail |
---|
public Symbol(String name, int address, boolean data)
name
- The name of the Symbol.address
- The memroy address that the Symbol refers to.data
- The type of Symbol that it is.Method Detail |
---|
public int getAddress()
public String getName()
public boolean getType()
public void setAddress(int newAddress)
newAddress
- The revised address of the Symbol.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |