|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.util.AbstractMap
|
+--java.util.HashMap
|
+--jrre.api.java.lang.SymbolTable
| Nested Class Summary |
| Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
| Constructor Summary | |
SymbolTable()
Default constructor for the symbol table. |
|
SymbolTable(int capacity)
Constructs the symbol table with the maximum number of entries it will need to have. |
|
| Method Summary | |
void |
addSymbol(int constantPoolIndex,
CPInfo entry)
Adds a symbol to the table based on its index in the constant pool. |
int |
getSize()
|
CPInfo |
getSymbol(int constantPoolIndex)
Gets a symbol from the table based its key into the constant pool. |
java.lang.String |
toString()
|
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
| Constructor Detail |
public SymbolTable()
public SymbolTable(int capacity)
capacity - The capacity to initialise it with.| Method Detail |
public void addSymbol(int constantPoolIndex,
CPInfo entry)
constantPoolIndex - The index in the constant pool associated with the entry.entry - The entry in the constant pool to add to the symbol table.public CPInfo getSymbol(int constantPoolIndex)
constantPoolIndex - The index in the constant pool associated with the desired entry.
public int getSize()
public java.lang.String toString()
toString in class java.util.AbstractMap
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||