Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## BEA WebLogic Server 9.0 API Reference

## weblogic.apache.xerces.util
Class ObjectFactory

    java.lang.Object
      weblogic.apache.xerces.util.ObjectFactory

Deprecated. please use JDK supplied XML parsers and transformers

public class ObjectFactory
extends 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.

Nested Class Summary
`static class` | `ObjectFactory.ConfigurationError` Deprecated. A configuration error.

Constructor Summary
`ObjectFactory()` Deprecated.

Method Summary
`static Object` | `createObject(String factoryId, String fallbackClassName)` Deprecated. Finds the implementation Class object in the specified order.
`static Object` | `createObject(String factoryId, String propertiesFilename, String fallbackClassName)` Deprecated. Finds the implementation Class object in the specified order.
`static ClassLoader` | `findClassLoader()` Deprecated. Figure out which ClassLoader to use.
`static Object` | `newInstance(String className, ClassLoader cl, boolean doFallback)` Deprecated. 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`

Constructor Detail

### ObjectFactory

    public ObjectFactory()

  Deprecated.

Method Detail

### createObject

    public static Object createObject(String factoryId,
                                      String fallbackClassName)
                               throws ObjectFactory.ConfigurationError

  Deprecated.
  Finds the implementation Class object in the specified order. The specified order is the following:
  1. query the system property using `System.getProperty`
  2. read `META-INF/services/factoryId` file
  3. use fallback classname

  Parameters:
    `factoryId` - Name of the factory to find, same as a property name
    `fallbackClassName` - Implementation class name, if nothing else is found. Use null to mean no fallback.
  Returns:
    Class object of factory, never null
  Throws:
    `ObjectFactory.ConfigurationError`

### createObject

    public static Object createObject(String factoryId,
                                      String propertiesFilename,
                                      String fallbackClassName)
                               throws ObjectFactory.ConfigurationError

  Deprecated.
  Finds the implementation Class object in the specified order. The specified order is the following:
  1. query the system property using `System.getProperty`
  2. read `$java.home/lib/propertiesFilename` file
  3. read `META-INF/services/factoryId` file
  4. use fallback classname

  Parameters:
    `factoryId` - Name of the factory to find, same as a property name
    `propertiesFilename` - The filename in the $java.home/lib directory of the properties file.
    `fallbackClassName` - Implementation class name, if nothing else is found. Use null to mean no fallback.
  Returns:
    Class object of factory, never null
  Throws:
    `ObjectFactory.ConfigurationError`

### findClassLoader

    public static ClassLoader findClassLoader()
                                       throws ObjectFactory.ConfigurationError

  Deprecated.
  Figure out which ClassLoader to use. For JDK 1.2 and later use the context ClassLoader.

  Throws:
    `ObjectFactory.ConfigurationError`

### newInstance

    public static Object newInstance(String className,
                                     ClassLoader cl,
                                     boolean doFallback)
                              throws ObjectFactory.ConfigurationError

  Deprecated.
  Create an instance of a class using the specified ClassLoader

  Throws:
    `ObjectFactory.ConfigurationError`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs90 Copyright 2005 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD