public final class

SynchronizedSymbolTable

extends SymbolTable
java.lang.Object
   ↳ org.apache.xerces.util.SymbolTable
     ↳ org.apache.xerces.util.SynchronizedSymbolTable

Class Overview

Synchronized symbol table. This class moved into the util package since it's needed by multiple other classes (CachingParserPool, XMLGrammarCachingConfiguration).

Summary

[Expand]
Inherited Constants
From class org.apache.xerces.util.SymbolTable
Fields
protected SymbolTable fSymbolTable Main symbol table.
[Expand]
Inherited Fields
From class org.apache.xerces.util.SymbolTable
Public Constructors
SynchronizedSymbolTable(SymbolTable symbolTable)
Constructs a synchronized symbol table.
SynchronizedSymbolTable()
SynchronizedSymbolTable(int size)
Public Methods
String addSymbol(char[] buffer, int offset, int length)
Adds the specified symbol to the symbol table and returns a reference to the unique symbol.
String addSymbol(String symbol)
Adds the specified symbol to the symbol table and returns a reference to the unique symbol.
boolean containsSymbol(char[] buffer, int offset, int length)
Returns true if the symbol table already contains the specified symbol.
boolean containsSymbol(String symbol)
Returns true if the symbol table already contains the specified symbol.
[Expand]
Inherited Methods
From class org.apache.xerces.util.SymbolTable
From class java.lang.Object

Fields

protected SymbolTable fSymbolTable

Main symbol table.

Public Constructors

public SynchronizedSymbolTable (SymbolTable symbolTable)

Constructs a synchronized symbol table.

public SynchronizedSymbolTable ()

public SynchronizedSymbolTable (int size)

Public Methods

public 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.

Parameters
buffer The buffer containing the new symbol.
offset The offset into the buffer of the new symbol.
length The length of the new symbol in the buffer.

public String addSymbol (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.

Parameters
symbol The new symbol.

public boolean containsSymbol (char[] buffer, int offset, int length)

Returns true if the symbol table already contains the specified symbol.

Parameters
buffer The buffer containing the symbol to look for.
offset The offset into the buffer.
length The length of the symbol in the buffer.

public boolean containsSymbol (String symbol)

Returns true if the symbol table already contains the specified symbol.

Parameters
symbol The symbol to look for.