Implements pluggable Datatypes.
This class is duplicated for each JAXP subpackage so keep it in sync. It is package private for secure class loading.
Modifier and Type | Field and Description |
---|---|
private static boolean | debug
Internal debug flag. |
private static final String |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
private static void | |
pack-priv static <T> T | Returns: Class object of factory, never nullBase class / Service interface of the
factory to find. type, String Implementation class name, if nothing else
is found. Use null to mean no fallback.
Package private so this code can be shared. fallbackClassName)Finds the implementation Class object in the specified order. |
private static <T> T | |
private static Class | getProviderClass(String className, ClassLoader cl, boolean doFallback, boolean useBSClsLoader)
Attempt to load a class using the class loader supplied. |
pack-priv static <T> T | newInstance(Class<T>
Base class / Service interface of the factory to
instantiate. type, String Name of the concrete class corresponding to the
service provider className, ClassLoader ClassLoader used to load the factory class. If null
current Thread 's context classLoader is used to load the factory class.True if the current ClassLoader should be tried as
a fallback if the class is not found using cl doFallback)Create an instance of a class. |
pack-priv static <T> T | newInstance(Class<T>
Base class / Service interface of the factory to
instantiate. type, String Name of the concrete class corresponding to the
service provider className, ClassLoader ClassLoader to use to load the class, null means to use
the bootstrap ClassLoader cl, boolean True if the current ClassLoader should be tried as
a fallback if the class is not found using cl doFallback, boolean True if cl=null actually meant bootstrap classLoader. This parameter
is needed since DocumentBuilderFactory/SAXParserFactory defined null as context classLoader. useBSClsLoader)Create an instance of a class. |
debug | back to summary |
---|---|
private static boolean debug Internal debug flag. |
DEFAULT_PACKAGE | back to summary |
---|---|
private static final String DEFAULT_PACKAGE |
FactoryFinder | back to summary |
---|---|
pack-priv FactoryFinder() |
dPrint | back to summary |
---|---|
private static void dPrint(Supplier<String> msgGen) |
find | back to summary |
---|---|
pack-priv static <T> T find(Class<T> type, String fallbackClassName) throws DatatypeConfigurationException Finds the implementation Class object in the specified order. Main entry point. |
findServiceProvider | back to summary |
---|---|
private static <T> T findServiceProvider(final Class<T> type) throws DatatypeConfigurationException
|
getProviderClass | back to summary |
---|---|
private static Class Attempt to load a class using the class loader supplied. If that fails
and fall back is enabled, the current (i.e. bootstrap) class loader is
tried.
If the class loader supplied is |
newInstance | back to summary |
---|---|
pack-priv static <T> T newInstance(Class<T> type, String className, ClassLoader cl, boolean doFallback) throws DatatypeConfigurationException Create an instance of a class. Delegates to method
|
newInstance | back to summary |
---|---|
pack-priv static <T> T newInstance(Class<T> type, String className, ClassLoader cl, boolean doFallback, boolean useBSClsLoader) throws DatatypeConfigurationException Create an instance of a class. Delegates to method
|