SynchronizedSymbolTablepublic final class SynchronizedSymbolTable extends SymbolTable Synchronized symbol table.
This class moved into the util package since it's needed by multiple
other classes (CachingParserPool, XMLGrammarCachingConfiguration). |
Fields Summary |
---|
protected SymbolTable | fSymbolTableMain symbol table. |
Constructors Summary |
---|
public SynchronizedSymbolTable(SymbolTable symbolTable)Constructs a synchronized symbol table.
fSymbolTable = symbolTable;
| public SynchronizedSymbolTable()
fSymbolTable = new SymbolTable();
| public SynchronizedSymbolTable(int size)
fSymbolTable = new SymbolTable(size);
|
Methods Summary |
---|
public java.lang.String | addSymbol(java.lang.String symbol)Adds the specified symbol to the symbol table and returns a
reference to the unique symbol. If the symbol already exists,
the previous symbol reference is returned instead, in order
guarantee that symbol references remain unique.
synchronized (fSymbolTable) {
return fSymbolTable.addSymbol(symbol);
}
| public java.lang.String | addSymbol(char[] buffer, int offset, int length)Adds the specified symbol to the symbol table and returns a
reference to the unique symbol. If the symbol already exists,
the previous symbol reference is returned instead, in order
guarantee that symbol references remain unique.
synchronized (fSymbolTable) {
return fSymbolTable.addSymbol(buffer, offset, length);
}
| public boolean | containsSymbol(java.lang.String symbol)Returns true if the symbol table already contains the specified
symbol.
synchronized (fSymbolTable) {
return fSymbolTable.containsSymbol(symbol);
}
| public boolean | containsSymbol(char[] buffer, int offset, int length)Returns true if the symbol table already contains the specified
symbol.
synchronized (fSymbolTable) {
return fSymbolTable.containsSymbol(buffer, offset, length);
}
|
|