| java.lang.Object com.sun.xml.stream.xerces.util.ObjectFactory
ObjectFactory | public 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.2 2006/04/01 06:01:39 jeffsuttor Exp $ |
Inner Class :public static class ConfigurationError extends Error | |
createObject | public 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
Class object 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 | public 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
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/xerces.properties will be used. Parameters: fallbackClassName - Implementation class name, if nothing elseis found. Use null to mean no fallback. exception: ObjectFactory.ConfigurationError - |
findClassLoader | public static ClassLoader findClassLoader() throws ConfigurationError(Code) | | Figure out which ClassLoader to use. For JDK 1.2 and later use
the context ClassLoader.
|
newInstance | public static Object newInstance(String className, ClassLoader cl, boolean doFallback) throws ConfigurationError(Code) | | Create an instance of a class using the specified ClassLoader
|
|
|