| java.lang.Object org.apache.xml.dtm.ObjectFactory
ObjectFactory | class ObjectFactory (Code) | | This class is duplicated for each JAXP subpackage so keep it in sync.
It is package private and therefore is not exposed as part of the JAXP
API.
This code is designed to implement the JAXP 1.1 spec pluggability
feature and is designed to run on JDK version 1.1 and
later, and to compile on JDK 1.2 and onward.
The code also runs both as part of an unbundled jar file and
when bundled as part of the JDK.
This class was moved from the javax.xml.parsers.ObjectFactory
class and modified to be used as a general utility for creating objects
dynamically.
version: $Id: ObjectFactory.java,v 1.5 2004/08/17 18:57:21 jycli Exp $ |
Inner Class :static class ConfigurationError extends Error | |
Method Summary | |
static Object | createObject(String factoryId, String fallbackClassName) Finds the implementation Class object in the specified order. | static Object | createObject(String factoryId, String propertiesFilename, String fallbackClassName) Finds the implementation Class object in the specified order. | static ClassLoader | findClassLoader() Figure out which ClassLoader to use. | static Class | findProviderClass(String className, ClassLoader cl, boolean doFallback) | static Class | lookUpFactoryClass(String factoryId) Finds the implementation Class object in the specified order. | static Class | lookUpFactoryClass(String factoryId, String propertiesFilename, String fallbackClassName) Finds the implementation Class object in the specified order. | static String | lookUpFactoryClassName(String factoryId, String propertiesFilename, String fallbackClassName) Finds the name of the required implementation class in the specified
order. | static Object | newInstance(String className, ClassLoader cl, boolean doFallback) |
createObject | static Object createObject(String factoryId, String fallbackClassName) throws ConfigurationError(Code) | | Finds the implementation Class object in the specified order. The
specified order is the following:
- query the system property using
System.getProperty
- read
META-INF/services/factoryId file
- use fallback classname
instance of factory, never null Parameters: factoryId - Name of the factory to find, same asa property name Parameters: fallbackClassName - Implementation class name, if nothing elseis found. Use null to mean no fallback. exception: ObjectFactory.ConfigurationError - |
createObject | static Object createObject(String factoryId, String propertiesFilename, String fallbackClassName) throws ConfigurationError(Code) | | Finds the implementation Class object in the specified order. The
specified order is the following:
- query the system property using
System.getProperty
- read
$java.home/lib/propertiesFilename file
- read
META-INF/services/factoryId file
- use fallback classname
instance of factory, never null Parameters: factoryId - Name of the factory to find, same asa property name Parameters: propertiesFilename - The filename in the $java.home/lib directoryof the properties file. If none specified,${java.home}/lib/xalan.properties will be used. Parameters: fallbackClassName - Implementation class name, if nothing elseis found. Use null to mean no fallback. exception: ObjectFactory.ConfigurationError - |
findClassLoader | static ClassLoader findClassLoader() throws ConfigurationError(Code) | | Figure out which ClassLoader to use. For JDK 1.2 and later use
the context ClassLoader.
|
lookUpFactoryClass | static Class lookUpFactoryClass(String factoryId) throws ConfigurationError(Code) | | Finds the implementation Class object in the specified order. The
specified order is the following:
- query the system property using
System.getProperty
- read
$java.home/lib/propertiesFilename file
- read
META-INF/services/factoryId file
- use fallback classname
Class object of factory, never null Parameters: factoryId - Name of the factory to find, same asa property name Parameters: propertiesFilename - The filename in the $java.home/lib directoryof the properties file. If none specified,${java.home}/lib/xalan.properties will be used. Parameters: fallbackClassName - Implementation class name, if nothing elseis found. Use null to mean no fallback. exception: ObjectFactory.ConfigurationError - |
lookUpFactoryClass | static Class lookUpFactoryClass(String factoryId, String propertiesFilename, String fallbackClassName) throws ConfigurationError(Code) | | Finds the implementation Class object in the specified order. The
specified order is the following:
- query the system property using
System.getProperty
- read
$java.home/lib/propertiesFilename file
- read
META-INF/services/factoryId file
- use fallback classname
Class object that provides factory service, never null Parameters: factoryId - Name of the factory to find, same asa property name Parameters: propertiesFilename - The filename in the $java.home/lib directoryof the properties file. If none specified,${java.home}/lib/xalan.properties will be used. Parameters: fallbackClassName - Implementation class name, if nothing elseis found. Use null to mean no fallback. exception: ObjectFactory.ConfigurationError - |
lookUpFactoryClassName | static String lookUpFactoryClassName(String factoryId, String propertiesFilename, String fallbackClassName)(Code) | | Finds the name of the required implementation class in the specified
order. The specified order is the following:
- query the system property using
System.getProperty
- read
$java.home/lib/propertiesFilename file
- read
META-INF/services/factoryId file
- use fallback classname
name of class that provides factory service, never null Parameters: factoryId - Name of the factory to find, same asa property name Parameters: propertiesFilename - The filename in the $java.home/lib directoryof the properties file. If none specified,${java.home}/lib/xalan.properties will be used. Parameters: fallbackClassName - Implementation class name, if nothing elseis found. Use null to mean no fallback. exception: ObjectFactory.ConfigurationError - |
newInstance | static Object newInstance(String className, ClassLoader cl, boolean doFallback) throws ConfigurationError(Code) | | Create an instance of a class using the specified ClassLoader
|
|
|