com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool

Here are the examples of the java api class com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool taken from open source projects.

1. WeakReferenceXMLSchema#getGrammarPool()

Project: openjdk
Source File: WeakReferenceXMLSchema.java
View license
/*
     * XSGrammarPoolContainer methods
     */
public synchronized XMLGrammarPool getGrammarPool() {
    XMLGrammarPool grammarPool = (XMLGrammarPool) fGrammarPool.get();
    // yet or the garbage collector has already cleaned out the previous one.
    if (grammarPool == null) {
        grammarPool = new SoftReferenceGrammarPool();
        fGrammarPool = new WeakReference(grammarPool);
    }
    return grammarPool;
}

2. CachingParserPool#createDOMParser()

Project: openjdk
Source File: CachingParserPool.java
View license
// setShadowSymbolTable(boolean)
// factory methods
/** Creates a new DOM parser. */
public DOMParser createDOMParser() {
    SymbolTable symbolTable = fShadowSymbolTable ? new ShadowedSymbolTable(fSynchronizedSymbolTable) : fSynchronizedSymbolTable;
    XMLGrammarPool grammarPool = fShadowGrammarPool ? new ShadowedGrammarPool(fSynchronizedGrammarPool) : fSynchronizedGrammarPool;
    return new DOMParser(symbolTable, grammarPool);
}

3. CachingParserPool#createSAXParser()

Project: openjdk
Source File: CachingParserPool.java
View license
// createDOMParser():DOMParser
/** Creates a new SAX parser. */
public SAXParser createSAXParser() {
    SymbolTable symbolTable = fShadowSymbolTable ? new ShadowedSymbolTable(fSynchronizedSymbolTable) : fSynchronizedSymbolTable;
    XMLGrammarPool grammarPool = fShadowGrammarPool ? new ShadowedGrammarPool(fSynchronizedGrammarPool) : fSynchronizedGrammarPool;
    return new SAXParser(symbolTable, grammarPool);
}