|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--attrib4j.AttributeCompilerFactory
Factory for creating AttributeCompiler
instances, with discovery and
configuration features similar to that employed by standard Java APIs
such as JAXP. Current implementations are based on Javadoc and ???
libraries.
Implementation taken from the jakarata commons logging package.
TODO Put common impl in a base class.
Field Summary | |
protected static java.util.Hashtable |
factories
The previously constructed AttributeCompilerFactory instances,
keyed by the ClassLoader with which it was created. |
static java.lang.String |
FACTORY_DEFAULT
The fully qualified class name of the fallback AttributeCompilerFactory
implementation class to use, if no other can be found. |
static java.lang.String |
FACTORY_PROPERTIES
The name of the properties file to search for. |
static java.lang.String |
FACTORY_PROPERTY
The name of the property used to identify the AttributeCompilerFactory implementation class name. |
protected static java.lang.String |
SERVICE_ID
JDK1.3+ 'Service Provider' specification ( http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html ) |
Constructor Summary | |
protected |
AttributeCompilerFactory()
Protected constructor that is not available for public use. |
Method Summary | |
abstract AttributeCompiler |
getAttributeCompiler()
Method to return a AttributeCompiler . |
protected static java.lang.ClassLoader |
getContextClassLoader()
Return the thread context class loader if available. |
static AttributeCompilerFactory |
getFactory()
Construct (if necessary) and return a AttributeCompilerFactory
instance, using the following ordered lookup procedure to determine
the name of the implementation class to be loaded. |
protected static AttributeCompilerFactory |
newFactory(java.lang.String factoryClass,
java.lang.ClassLoader classLoader)
Return a new instance of the specified AttributeCompilerFactory
implementation class, loaded by the specified class loader. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String FACTORY_PROPERTY
public static final java.lang.String FACTORY_DEFAULT
AttributeCompilerFactory
implementation class to use, if no other can be found.
public static final java.lang.String FACTORY_PROPERTIES
protected static final java.lang.String SERVICE_ID
protected static java.util.Hashtable factories
AttributeCompilerFactory
instances,
keyed by the ClassLoader
with which it was created.
Constructor Detail |
protected AttributeCompilerFactory()
Method Detail |
public static AttributeCompilerFactory getFactory() throws AttributeException
Construct (if necessary) and return a AttributeCompilerFactory
instance, using the following ordered lookup procedure to determine
the name of the implementation class to be loaded.
attrib4j.AttributeCompilerFactory
system property.attrib4j.properties
file, if found in the class path of this class. The configuration
file is in standard java.util.Properties
format and
contains the fully qualified name of the implementation class
with the key being the system property defined above.attrib4j.compiler.JavadocFactory
).
AttributeException
- if the implementation class is not
available or cannot be instantiated.public abstract AttributeCompiler getAttributeCompiler() throws AttributeException
AttributeCompiler
.
AttributeException
- if a suitable AttributeCompiler
instance cannot be returnedprotected static java.lang.ClassLoader getContextClassLoader() throws AttributeException
AttributeException
- if a suitable class loader
cannot be identified.protected static AttributeCompilerFactory newFactory(java.lang.String factoryClass, java.lang.ClassLoader classLoader) throws AttributeException
AttributeCompilerFactory
implementation class, loaded by the specified class loader.
If that fails, try the class loader used to load this
(abstract) AttributeCompilerFactory.
factoryClass
- Fully qualified name of the
AttributeCompilerFactory
implementation classclassLoader
- ClassLoader from which to load this class
AttributeException
- if a suitable instance
cannot be created
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |