|
|||||||||
| Home >> All >> org >> apache >> xpath >> [ compiler overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.xpath.compiler
Class ObjectFactory

java.lang.Objectorg.apache.xpath.compiler.ObjectFactory
- class ObjectFactory
- extends java.lang.Object
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 2004/02/23 10:29:37 aruny Exp $
| Nested Class Summary | |
(package private) static class |
ObjectFactory.ConfigurationError
A configuration error. |
| Field Summary | |
private static boolean |
DEBUG
Set to true for debugging |
private static java.lang.String |
DEFAULT_PROPERTIES_FILENAME
|
private static long |
fLastModified
Cache the time stamp of the xalan.properties file so that we know if it's been modified and can invalidate the cache when necessary. |
private static java.util.Properties |
fXalanProperties
cache the contents of the xalan.properties file. |
private static java.lang.String |
SERVICES_PATH
|
| Constructor Summary | |
(package private) |
ObjectFactory()
|
| Method Summary | |
(package private) static java.lang.Object |
createObject(java.lang.String factoryId,
java.lang.String fallbackClassName)
Finds the implementation Class object in the specified order. |
(package private) static java.lang.Object |
createObject(java.lang.String factoryId,
java.lang.String propertiesFilename,
java.lang.String fallbackClassName)
Finds the implementation Class object in the specified order. |
private static void |
debugPrintln(java.lang.String msg)
Prints a message to standard error if debugging is enabled. |
(package private) static java.lang.ClassLoader |
findClassLoader()
Figure out which ClassLoader to use. |
private static java.lang.String |
findJarServiceProviderName(java.lang.String factoryId)
Find the name of service provider using Jar Service Provider Mechanism |
(package private) static java.lang.Class |
findProviderClass(java.lang.String className,
java.lang.ClassLoader cl,
boolean doFallback)
Find a Class using the specified ClassLoader |
(package private) static java.lang.Class |
lookUpFactoryClass(java.lang.String factoryId)
Finds the implementation Class object in the specified order. |
(package private) static java.lang.Class |
lookUpFactoryClass(java.lang.String factoryId,
java.lang.String propertiesFilename,
java.lang.String fallbackClassName)
Finds the implementation Class object in the specified order. |
(package private) static java.lang.String |
lookUpFactoryClassName(java.lang.String factoryId,
java.lang.String propertiesFilename,
java.lang.String fallbackClassName)
Finds the name of the required implementation class in the specified order. |
(package private) static java.lang.Object |
newInstance(java.lang.String className,
java.lang.ClassLoader cl,
boolean doFallback)
Create an instance of a class using the specified ClassLoader |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
DEFAULT_PROPERTIES_FILENAME
private static final java.lang.String DEFAULT_PROPERTIES_FILENAME
- See Also:
- Constant Field Values
SERVICES_PATH
private static final java.lang.String SERVICES_PATH
- See Also:
- Constant Field Values
DEBUG
private static final boolean DEBUG
- Set to true for debugging
- See Also:
- Constant Field Values
fXalanProperties
private static java.util.Properties fXalanProperties
- cache the contents of the xalan.properties file.
Until an attempt has been made to read this file, this will
be null; if the file does not exist or we encounter some other error
during the read, this will be empty.
fLastModified
private static long fLastModified
- Cache the time stamp of the xalan.properties file so
that we know if it's been modified and can invalidate
the cache when necessary.
| Constructor Detail |
ObjectFactory
ObjectFactory()
| Method Detail |
createObject
static java.lang.Object createObject(java.lang.String factoryId, java.lang.String fallbackClassName) throws ObjectFactory.ConfigurationError
- 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/factoryIdfile - use fallback classname
- query the system property using
createObject
static java.lang.Object createObject(java.lang.String factoryId, java.lang.String propertiesFilename, java.lang.String fallbackClassName) throws ObjectFactory.ConfigurationError
- 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/propertiesFilenamefile - read
META-INF/services/factoryIdfile - use fallback classname
- query the system property using
lookUpFactoryClass
static java.lang.Class lookUpFactoryClass(java.lang.String factoryId) throws ObjectFactory.ConfigurationError
- 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/propertiesFilenamefile - read
META-INF/services/factoryIdfile - use fallback classname
- query the system property using
lookUpFactoryClass
static java.lang.Class lookUpFactoryClass(java.lang.String factoryId, java.lang.String propertiesFilename, java.lang.String fallbackClassName) throws ObjectFactory.ConfigurationError
- 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/propertiesFilenamefile - read
META-INF/services/factoryIdfile - use fallback classname
- query the system property using
lookUpFactoryClassName
static java.lang.String lookUpFactoryClassName(java.lang.String factoryId, java.lang.String propertiesFilename, java.lang.String fallbackClassName)
- 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/propertiesFilenamefile - read
META-INF/services/factoryIdfile - use fallback classname
- query the system property using
debugPrintln
private static void debugPrintln(java.lang.String msg)
- Prints a message to standard error if debugging is enabled.
findClassLoader
static java.lang.ClassLoader findClassLoader() throws ObjectFactory.ConfigurationError
- Figure out which ClassLoader to use. For JDK 1.2 and later use
the context ClassLoader.
newInstance
static java.lang.Object newInstance(java.lang.String className, java.lang.ClassLoader cl, boolean doFallback) throws ObjectFactory.ConfigurationError
- Create an instance of a class using the specified ClassLoader
findProviderClass
static java.lang.Class findProviderClass(java.lang.String className, java.lang.ClassLoader cl, boolean doFallback) throws java.lang.ClassNotFoundException, ObjectFactory.ConfigurationError
- Find a Class using the specified ClassLoader
findJarServiceProviderName
private static java.lang.String findJarServiceProviderName(java.lang.String factoryId)
- Find the name of service provider using Jar Service Provider Mechanism
|
|||||||||
| Home >> All >> org >> apache >> xpath >> [ compiler overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.xpath.compiler.ObjectFactory