1 16 17 package org.apache.xerces.jaxp.validation; 18 19 import java.lang.ref.WeakReference ; 20 21 import org.apache.xerces.xni.grammars.XMLGrammarPool; 22 23 33 final class WeakReferenceXMLSchema extends AbstractXMLSchema { 34 35 36 private WeakReference fGrammarPool = new WeakReference (null); 37 38 public WeakReferenceXMLSchema() {} 39 40 43 44 public synchronized XMLGrammarPool getGrammarPool() { 45 XMLGrammarPool grammarPool = (XMLGrammarPool) fGrammarPool.get(); 46 if (grammarPool == null) { 49 grammarPool = new SoftReferenceGrammarPool(); 50 fGrammarPool = new WeakReference (grammarPool); 51 } 52 return grammarPool; 53 } 54 55 public boolean isFullyComposed() { 56 return false; 57 } 58 59 } | Popular Tags |