Top Description Fields Constructors Methods
com.sun.org.apache.xalan.internal.utils

public Class ObjectFactory

extends Object
Class Inheritance
Imports
java.util.function.Supplier, jdk.xml.internal.SecuritySupport

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 class was moved from the javax.xml.parsers.ObjectFactory class and modified to be used as a general utility for creating objects dynamically.

Field Summary

Modifier and TypeField and Description
private static final boolean
DEBUG

Set to true for debugging

private static final String
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
debugPrintln(Supplier<String> msgGen)

Prints a message to standard error if debugging is enabled.

public static ClassLoader
findClassLoader()

Figure out which ClassLoader to use.

public static Class<?>
findProviderClass(String className, boolean doFallback)

Find a Class using the same class loader for the ObjectFactory by default or boot class loader when Security Manager is in place

private static Class<?>
findProviderClass(String className, ClassLoader cl, boolean doFallback)

Find a Class using the specified ClassLoader

public static Object
newInstance(String className, boolean doFallback)

Create an instance of a class using the same class loader for the ObjectFactory by default or boot class loader when Security Manager is in place

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEBUGback to summary
private static final boolean DEBUG

Set to true for debugging

JAXP_INTERNALback to summary
private static final String JAXP_INTERNAL
STAX_INTERNALback to summary
private static final String STAX_INTERNAL

Constructor Detail

ObjectFactoryback to summary
public ObjectFactory()

Method Detail

debugPrintlnback to summary
private static void debugPrintln(Supplier<String> msgGen)

Prints a message to standard error if debugging is enabled.

findClassLoaderback to summary
public static ClassLoader findClassLoader()

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

Annotations
@SuppressWarnings:removal
findProviderClassback to summary
public static Class<?> findProviderClass(String className, boolean doFallback) throws ClassNotFoundException, ConfigurationError

Find a Class using the same class loader for the ObjectFactory by default or boot class loader when Security Manager is in place

findProviderClassback to summary
private static Class<?> findProviderClass(String className, ClassLoader cl, boolean doFallback) throws ClassNotFoundException, ConfigurationError

Find a Class using the specified ClassLoader

newInstanceback to summary
public static Object newInstance(String className, boolean doFallback) throws ConfigurationError

Create an instance of a class using the same class loader for the ObjectFactory by default or boot class loader when Security Manager is in place