org.enhydra.xml.xmlc.dom
Class XMLCDomFactoryCache

java.lang.Object
  |
  +--org.enhydra.xml.xmlc.dom.XMLCDomFactoryCache

public class XMLCDomFactoryCache
extends Object

Class that provides a cache of XMLCDomFactory objects. Since these classes are simple, they are normally reentrant. This cache provides a mechanism to maintain only one instance of each class. Currently, instances are never freed from this cache. Also creates factories for use at compile-time.


Method Summary
static void checkForOutdatedClass(XMLCDomFactory domFactory)
          Check a DOM factory for outdated methods.
static XMLCDomFactory createFactory(String factoryClassName, boolean isHtmlDocument)
           
static XMLCDomFactory createFactory(String factoryClassName, boolean isHtmlDocument, ClassLoader loader)
          Create an instance of an XMLCDomFactory.
static XMLCDomFactory getFactory(Class factoryClass)
          Get an instance of an XMLCDomFactory given it's class.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createFactory

public static XMLCDomFactory createFactory(String factoryClassName,
                                           boolean isHtmlDocument,
                                           ClassLoader loader)
Create an instance of an XMLCDomFactory. This is used both at compile time to get a factory and at runtime for dynamic loading access to learn how to build the XMLC class. If the classloader is null, it is assumed that this is a compile time activity and the dom factory will not be added to the cache. Otherwise, the factory is cached.
Parameters:
factoryClassName - name of factory to create, or the default if null
isHtmlDocument - used only to determine the default factoryClassName
loader - the classloader to load the factory class, may be null

createFactory

public static XMLCDomFactory createFactory(String factoryClassName,
                                           boolean isHtmlDocument)

getFactory

public static XMLCDomFactory getFactory(Class factoryClass)
Get an instance of an XMLCDomFactory given it's class.

checkForOutdatedClass

public static void checkForOutdatedClass(XMLCDomFactory domFactory)
Check a DOM factory for outdated methods. Several methods were changed in the XMLCDomFactory. Since few users implement these classes, its was decided to just obsolute the methods. However, since most XMLCDomFactories extend the base one, one just got weird behavior (generic documents instead of specific ones). To work around this, this method checks for outdated factory methods and generates errors if found.


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.