Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.xerces.parsers
Class CachingParserPool.ShadowedGrammarPool  view CachingParserPool.ShadowedGrammarPool download CachingParserPool.ShadowedGrammarPool.java

java.lang.Object
  extended byorg.apache.xerces.util.XMLGrammarPoolImpl
      extended byorg.apache.xerces.parsers.CachingParserPool.ShadowedGrammarPool
All Implemented Interfaces:
org.apache.xerces.xni.grammars.XMLGrammarPool
Enclosing class:
CachingParserPool

public static final class CachingParserPool.ShadowedGrammarPool
extends org.apache.xerces.util.XMLGrammarPoolImpl

Shadowed grammar pool. This class is predicated on the existence of a concrete implementation; so using our own doesn't seem to bad an idea.


Nested Class Summary
 
Nested classes inherited from class org.apache.xerces.util.XMLGrammarPoolImpl
org.apache.xerces.util.XMLGrammarPoolImpl.Entry
 
Field Summary
private  org.apache.xerces.xni.grammars.XMLGrammarPool fGrammarPool
          Main grammar pool.
 
Fields inherited from class org.apache.xerces.util.XMLGrammarPoolImpl
fGrammarCount, fGrammars, fPoolIsLocked, TABLE_SIZE
 
Constructor Summary
CachingParserPool.ShadowedGrammarPool(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
          Constructs a shadowed grammar pool.
 
Method Summary
 void cacheGrammars(java.lang.String grammarType, org.apache.xerces.xni.grammars.Grammar[] grammars)
          Give the grammarPool the option of caching these grammars.
 boolean containsGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
          Returns true if the grammar pool contains a grammar associated to the specified description.
 org.apache.xerces.xni.grammars.Grammar getGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
          Returns the grammar associated to the specified description.
 org.apache.xerces.xni.grammars.Grammar retrieveGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription gDesc)
          Retrieve a particular grammar.
 org.apache.xerces.xni.grammars.Grammar[] retrieveInitialGrammarSet(java.lang.String grammarType)
          Retrieve the initial set of grammars for the validator to work with.
 
Methods inherited from class org.apache.xerces.util.XMLGrammarPoolImpl
clear, equals, hashCode, lockPool, putGrammar, removeGrammar, unlockPool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fGrammarPool

private org.apache.xerces.xni.grammars.XMLGrammarPool fGrammarPool
Main grammar pool.

Constructor Detail

CachingParserPool.ShadowedGrammarPool

public CachingParserPool.ShadowedGrammarPool(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Constructs a shadowed grammar pool.

Method Detail

retrieveInitialGrammarSet

public org.apache.xerces.xni.grammars.Grammar[] retrieveInitialGrammarSet(java.lang.String grammarType)
Retrieve the initial set of grammars for the validator to work with. REVISIT: does this need to be synchronized since it's just reading?


retrieveGrammar

public org.apache.xerces.xni.grammars.Grammar retrieveGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription gDesc)
Retrieve a particular grammar. REVISIT: does this need to be synchronized since it's just reading?


cacheGrammars

public void cacheGrammars(java.lang.String grammarType,
                          org.apache.xerces.xni.grammars.Grammar[] grammars)
Give the grammarPool the option of caching these grammars. This certainly must be synchronized.


getGrammar

public org.apache.xerces.xni.grammars.Grammar getGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
Returns the grammar associated to the specified description.


containsGrammar

public boolean containsGrammar(org.apache.xerces.xni.grammars.XMLGrammarDescription desc)
Returns true if the grammar pool contains a grammar associated to the specified description.