org.apache.xerces.util
public class XMLGrammarPoolImpl extends Object implements XMLGrammarPool
Version: $Id: XMLGrammarPoolImpl.java,v 1.8 2004/03/25 04:03:22 mrglavas Exp $
| Nested Class Summary | |
|---|---|
| protected static class | XMLGrammarPoolImpl.Entry
This class is a grammar pool entry. |
| Field Summary | |
|---|---|
| protected int | fGrammarCount |
| protected XMLGrammarPoolImpl.Entry[] | fGrammars Grammars. |
| protected boolean | fPoolIsLocked |
| protected static int | TABLE_SIZE Default size. |
| Constructor Summary | |
|---|---|
| XMLGrammarPoolImpl() Constructs a grammar pool with a default number of buckets. | |
| XMLGrammarPoolImpl(int initialCapacity) Constructs a grammar pool with a specified number of buckets. | |
| Method Summary | |
|---|---|
| void | cacheGrammars(String grammarType, Grammar[] grammars) |
| void | clear() |
| boolean | containsGrammar(XMLGrammarDescription desc)
Returns true if the grammar pool contains a grammar associated
to the specified grammar description. |
| boolean | equals(XMLGrammarDescription desc1, XMLGrammarDescription desc2)
This method checks whether two grammars are the same. |
| Grammar | getGrammar(XMLGrammarDescription desc)
Returns the grammar associated to the specified grammar description.
|
| int | hashCode(XMLGrammarDescription desc)
Returns the hash code value for the given grammar description.
|
| void | lockPool() |
| void | putGrammar(Grammar grammar)
Puts the specified grammar into the grammar pool and associates it to
its root element name or its target namespace.
|
| Grammar | removeGrammar(XMLGrammarDescription desc)
Removes the grammar associated to the specified grammar description from the
grammar pool and returns the removed grammar. |
| Grammar | retrieveGrammar(XMLGrammarDescription desc) |
| Grammar[] | retrieveInitialGrammarSet(String grammarType) |
| void | unlockPool() |
Parameters: desc The Grammar Description.
Parameters: desc1 The grammar description desc2 The grammar description of the grammar to be compared to
Returns: True if the grammars are equal, otherwise false
Parameters: desc The Grammar Description.
Parameters: desc The grammar description
Returns: The hash code value
Parameters: grammar The Grammar.
Parameters: desc The Grammar Description.
Returns: The removed grammar.