|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcode.table.MapTable
public class MapTable
This class defines a mapping from the integers 1,2,3,... to the symbols of a program. A symbol in a term is identified by this integer. The mapping is injective and provides fast access to the symbol.
This table is written during the modules loading phase by ModuleTable and/or SymbolTable and is read during the execution of a program. The visibility of methods is suggested by this modus of use.
| Field Summary | |
|---|---|
private static int |
baseline
Saved value of NextId when setBaseline was called. |
private static java.util.Vector |
intToSymbol
Mapping representation |
private static int |
nextId
Counts the ids used so far |
| Constructor Summary | |
|---|---|
private |
MapTable()
Singleton class |
| Method Summary | |
|---|---|
static java.util.Enumeration |
getAllSymbols()
|
static int |
getId(java.lang.String symbolName)
|
static DataSymbol |
getSymbol(int id)
|
(package private) static void |
installSymbol(Symbol symbol,
int id)
|
(package private) static int |
nextId()
|
(package private) static void |
resetBaseline()
Remove all the symbols except those below the baseline. |
(package private) static void |
setBaseline()
Save the value of nextId in baseline. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.util.Vector intToSymbol
private static int nextId
private static int baseline
| Constructor Detail |
|---|
private MapTable()
| Method Detail |
|---|
static int nextId()
static void setBaseline()
static void resetBaseline()
static void installSymbol(Symbol symbol,
int id)
public static DataSymbol getSymbol(int id)
public static int getId(java.lang.String symbolName)
throws AmbiguousSymbolException
AmbiguousSymbolExceptionpublic static java.util.Enumeration getAllSymbols()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||