|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAbstractTable
IdTable
Field Summary | |
static IdTable |
idtable
Global string table of identifiers |
static IntTable |
inttable
Global string table of integer constants |
static StringTable |
stringtable
Global string table of string constants |
protected java.util.Vector |
tbl
Vector of table entries |
Constructor Summary | |
(package private) |
IdTable()
|
Method Summary | |
AbstractSymbol |
addInt(int i)
Adds the string representation of the specified integer to this string table |
AbstractSymbol |
addString(java.lang.String s)
Adds the specified string to this string table |
AbstractSymbol |
addString(java.lang.String s,
int maxchars)
Adds prefix of the specified length to this string table |
protected AbstractSymbol |
getNewSymbol(java.lang.String s,
int len,
int index)
Creates a new IdSymbol object. |
java.util.Enumeration |
getSymbols()
Returns an enumeration of symbols in this string table |
AbstractSymbol |
lookup(int index)
Looks up a symbol in this string table by its index A fatal error is signalled if the index is out of bounds. |
AbstractSymbol |
lookup(java.lang.String s)
Looks up a symbol in this string table by its string representation A fatal error is signalled if the string is not in the table |
java.lang.String |
toString()
Produces a printable representation of the string table |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static StringTable stringtable
public static IdTable idtable
public static IntTable inttable
protected java.util.Vector tbl
Constructor Detail |
IdTable()
Method Detail |
protected AbstractSymbol getNewSymbol(java.lang.String s, int len, int index)
getNewSymbol
in class AbstractTable
IdSymbol
public AbstractSymbol addString(java.lang.String s, int maxchars)
s
- the string to addmaxchars
- the length of the prefix
public AbstractSymbol addString(java.lang.String s)
s
- the string to add
public AbstractSymbol addInt(int i)
i
- the integer to add
public java.util.Enumeration getSymbols()
Enumeration
public AbstractSymbol lookup(int index)
index
- the index of the symbol
public AbstractSymbol lookup(java.lang.String s)
s
- the string representation of the symbol
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |