Top Fields Constructors Methods
javax.xml.soap

pack-priv Class FactoryFinder

extends Object
Class Inheritance
Imports
java.io.*, java.nio.charset.StandardCharsets, java.nio.file.Files, .Path, .Paths, java.security.AccessController, .PrivilegedAction, java.util.Properties, java.util.logging.Level, .Logger

Field Summary

Modifier and TypeField and Description
private static final ServiceLoaderUtil.ExceptionHandler<SOAPException>
private static final Logger

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static <T> T

Returns:

the Class object of the specified message factory; may not be null
find
(Class<T>
factory abstract class or interface to be found
factoryClass
,
String
the implementation class name, which is to be used only if nothing else is found; null to indicate that there is no default class name
defaultClassName
,
boolean
whether to try the default class as a fallback
tryFallback
,
String
deprecated name of a factory; it is used for types where class name is different from a name being searched (in previous spec).
deprecatedFactoryId
)

Finds the implementation Class object for the given factory type.

pack-priv static <T> T
find(Class<T> factoryClass, String defaultClassName, boolean tryFallback)

private static String
fromJDKProperties(String factoryId, String deprecatedFactoryId)

private static String
fromMetaInfServices(String deprecatedFactoryId, ClassLoader tccl)

private static String
fromSystemProperty(String factoryId, String deprecatedFactoryId)

private static String
getSystemProperty(final String property)

private static void
private static Object
newInstance(String className, String defaultClassName, ClassLoader tccl)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EXCEPTION_HANDLERback to summary
private static final ServiceLoaderUtil.ExceptionHandler<SOAPException> EXCEPTION_HANDLER
loggerback to summary
private static final Logger logger

Constructor Detail

FactoryFinderback to summary
pack-priv FactoryFinder()

Method Detail

findback to summary
pack-priv static <T> T find(Class<T> factoryClass, String defaultClassName, boolean tryFallback, String deprecatedFactoryId) throws SOAPException

Finds the implementation Class object for the given factory type. If it fails and tryFallback is true finds the Class object for the given default class name. The arguments supplied must be used in order Note the default class name may be needed even if fallback is not to be attempted in order to check if requested type is fallback.

This method is package private so that this code can be shared.

Parameters
factoryClass:Class<T>

factory abstract class or interface to be found

defaultClassName:String

the implementation class name, which is to be used only if nothing else is found; null to indicate that there is no default class name

tryFallback:boolean

whether to try the default class as a fallback

deprecatedFactoryId:String

deprecated name of a factory; it is used for types where class name is different from a name being searched (in previous spec).

Returns:T

the Class object of the specified message factory; may not be null

Annotations
@SuppressWarnings:unchecked
Exceptions
SOAPException:
if there is a SOAP error
findback to summary
pack-priv static <T> T find(Class<T> factoryClass, String defaultClassName, boolean tryFallback) throws SOAPException
fromJDKPropertiesback to summary
private static String fromJDKProperties(String factoryId, String deprecatedFactoryId)
fromMetaInfServicesback to summary
private static String fromMetaInfServices(String deprecatedFactoryId, ClassLoader tccl)
fromSystemPropertyback to summary
private static String fromSystemProperty(String factoryId, String deprecatedFactoryId)
getSystemPropertyback to summary
private static String getSystemProperty(final String property)
logFoundback to summary
private static void logFound(String value)
newInstanceback to summary
private static Object newInstance(String className, String defaultClassName, ClassLoader tccl) throws SOAPException