Top Constructors Methods
jakarta.mail.util

pack-priv Class FactoryFinder

extends Object
Class Inheritance
Imports
java.lang.reflect.Method, java.util.Arrays, .Iterator, .ServiceLoader

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

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

Returns:

the Class object of the specified message factory
find
(Class<T>
factory abstract class or interface to be found
factoryClass
)

Finds the implementation Class object for the given factory type.

private static <T> T
find(Class<T> factoryClass, ClassLoader loader)

private static String
private static Class<?>[]
private static <T> T
private static <T> T
newInstance(String className, Class<T> factoryClass, ClassLoader classLoader)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

FactoryFinderback to summary
pack-priv FactoryFinder()

Method Detail

checkPackageAccessback to summary
private static void checkPackageAccess(String className)
factoryFromServiceLoaderback to summary
private static <T> T factoryFromServiceLoader(Class<T> factory, ClassLoader loader)
findback to summary
pack-priv static <T> T find(Class<T> factoryClass) throws RuntimeException

Finds the implementation Class object for the given factory type. The arguments supplied must be used in order This method is package private so that this code can be shared.

Parameters
factoryClass:Class<T>

factory abstract class or interface to be found

Returns:T

the Class object of the specified message factory

Exceptions
RuntimeException:
if there is an error
findback to summary
private static <T> T find(Class<T> factoryClass, ClassLoader loader) throws RuntimeException
fromSystemPropertyback to summary
private static String fromSystemProperty(String factoryId)
getHk2ServiceLoaderTargetsback to summary
private static Class<?>[] getHk2ServiceLoaderTargets(Class<?> factoryClass)
lookupUsingHk2ServiceLoaderback to summary
private static <T> T lookupUsingHk2ServiceLoader(Class<T> factoryClass, ClassLoader loader)
Annotations
@SuppressWarnings:unchecked
newInstanceback to summary
private static <T> T newInstance(String className, Class<T> factoryClass, ClassLoader classLoader) throws RuntimeException