dpt.symbtab
Class StringTable

java.lang.Object
  |
  +--dpt.symbtab.StringTable

class StringTable
extends java.lang.Object

Keeps track of all strings encountered in the file that represent identifiers. This way we only ever keep a single copy of a string and all symbols refer to it.


Field Summary
private  java.util.Hashtable names
          The hash table that holds all the strings.
 
Constructor Summary
(package private) StringTable()
           
 
Method Summary
(package private)  java.lang.String getName(java.lang.String name)
          Get a name from the StringTable
 java.lang.String toString()
          Write out that this is a string table...
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

names

private java.util.Hashtable names
The hash table that holds all the strings. Note that if we were tuning this we'd adjust the size of the hash table to find a fairly efficient setting
Constructor Detail

StringTable

StringTable()
Method Detail

getName

java.lang.String getName(java.lang.String name)
Get a name from the StringTable

toString

public java.lang.String toString()
Write out that this is a string table...
Overrides:
toString in class java.lang.Object