APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.utils

public final 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 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.

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 classloader for the ObjectFactory by default or bootclassloader when Security Manager is in place

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

Find a Class using the specified ClassLoader

private static boolean
isDebugEnabled()

Returns true if debug has been enabled.

public static Object
newInstance(String className, boolean doFallback)

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

public static Object
newInstance(String className, ClassLoader cl, boolean doFallback)

Create an instance of a class using the specified ClassLoader

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() throws ConfigurationError

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

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

Find a Class using the same classloader for the ObjectFactory by default or bootclassloader when Security Manager is in place

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

Find a Class using the specified ClassLoader

isDebugEnabledback to summary
private static boolean isDebugEnabled()

Returns true if debug has been enabled.

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

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

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

Create an instance of a class using the specified ClassLoader