Top Fields Constructors Methods
javax.xml.ws.spi

pack-priv Class FactoryFinder

extends Object
Class Inheritance
Imports
java.io.*, java.nio.file.Files, .Path, .Paths, java.util.Properties, java.util.logging.Level, .Logger, javax.xml.ws.WebServiceException

Field Summary

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

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>
the name of the factory to find, which is a system property
factoryClass
,
String
the implementation class name, which is to be used only if nothing else is found; null to indicate that there is no fallback class name
fallbackClassName
)

Finds the implementation Class object for the given factory name, or if that fails, finds the Class object for the given fallback class name.

private static Object
fromJDKProperties(String factoryId, String fallbackClassName, ClassLoader classLoader)

private static Object
fromSystemProperty(String factoryId, String fallbackClassName, ClassLoader classLoader)

private static boolean
private static Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EXCEPTION_HANDLERback to summary
private static final ServiceLoaderUtil.ExceptionHandler<WebServiceException> EXCEPTION_HANDLER
loggerback to summary
private static final Logger logger
OSGI_SERVICE_LOADER_CLASS_NAMEback to summary
private static final String OSGI_SERVICE_LOADER_CLASS_NAME

Constructor Detail

FactoryFinderback to summary
pack-priv FactoryFinder()

Method Detail

findback to summary
pack-priv static <T> T find(Class<T> factoryClass, String fallbackClassName)

Finds the implementation Class object for the given factory name, or if that fails, finds the Class object for the given fallback class name. The arguments supplied MUST be used in order. If using the first argument is successful, the second one will not be used.

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

Parameters
factoryClass:Class<T>

the name of the factory to find, which is a system property

fallbackClassName:String

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

Returns:T

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

Annotations
@SuppressWarnings:unchecked
Exceptions
WebServiceException:
if there is an error
fromJDKPropertiesback to summary
private static Object fromJDKProperties(String factoryId, String fallbackClassName, ClassLoader classLoader)
fromSystemPropertyback to summary
private static Object fromSystemProperty(String factoryId, String fallbackClassName, ClassLoader classLoader)
isOsgiback to summary
private static boolean isOsgi()
lookupUsingOSGiServiceLoaderback to summary
private static Object lookupUsingOSGiServiceLoader(String factoryId)