org.apache.xerces.parsers
Class CachingParserPool.SynchronizedGrammarPool

java.lang.Object
  |
  +--org.apache.xerces.impl.validation.GrammarPool
        |
        +--org.apache.xerces.parsers.CachingParserPool.SynchronizedGrammarPool
Enclosing class:
CachingParserPool

public static final class CachingParserPool.SynchronizedGrammarPool
extends GrammarPool

Synchronized grammar pool.

Author:
Andy Clark, IBM

Fields inherited from class org.apache.xerces.impl.validation.GrammarPool
fGrammars, fGrammarsNS, fNoNSGrammar
 
Constructor Summary
CachingParserPool.SynchronizedGrammarPool(GrammarPool grammarPool)
          Constructs a synchronized grammar pool.
 
Method Summary
 boolean containsGrammar(java.lang.String key)
          Returns true if the grammar pool contains a grammar associated to the specified key.
 Grammar getGrammar(java.lang.String key)
          Returns the grammar associated to the specified key.
 void putGrammar(java.lang.String key, Grammar grammar)
          Puts the specified grammar into the grammar pool.
 Grammar removeGrammar(java.lang.String key)
          Removes the grammar associated to the specified key from the grammar pool and returns the removed grammar.
 
Methods inherited from class org.apache.xerces.impl.validation.GrammarPool
containsGrammarNS, getGrammarNS, getGrammars, getGrammarsNS, putGrammarNS, removeGrammarNS
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingParserPool.SynchronizedGrammarPool

public CachingParserPool.SynchronizedGrammarPool(GrammarPool grammarPool)
Constructs a synchronized grammar pool.
Method Detail

putGrammar

public void putGrammar(java.lang.String key,
                       Grammar grammar)
Puts the specified grammar into the grammar pool.
Overrides:
putGrammar in class GrammarPool
Parameters:
key - Key to associate with grammar.
grammar - Grammar object.

getGrammar

public Grammar getGrammar(java.lang.String key)
Returns the grammar associated to the specified key.
Overrides:
getGrammar in class GrammarPool
Parameters:
key - The key of the grammar.

removeGrammar

public Grammar removeGrammar(java.lang.String key)
Removes the grammar associated to the specified key from the grammar pool and returns the removed grammar.
Overrides:
removeGrammar in class GrammarPool
Parameters:
key - The key of the grammar.

containsGrammar

public boolean containsGrammar(java.lang.String key)
Returns true if the grammar pool contains a grammar associated to the specified key.
Overrides:
containsGrammar in class GrammarPool
Parameters:
key - The key of the grammar.


Copyright © 1999-2001 Apache XML Project. All Rights Reserved.