Package javax.el
Class FactoryFinder
java.lang.Object
javax.el.FactoryFinder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static Object
find
(Class<?> serviceClass, String factoryId, String fallbackClassName, Properties properties) Finds the implementationClass
object for the given factory.private static Object
newInstance
(String className, ClassLoader classLoader, Properties properties) Creates an instance of the specified class using the specifiedClassLoader
object.
-
Constructor Details
-
FactoryFinder
FactoryFinder()
-
-
Method Details
-
newInstance
Creates an instance of the specified class using the specifiedClassLoader
object.- Throws:
ELException
- if the given class could not be found or could not be instantiated
-
find
static Object find(Class<?> serviceClass, String factoryId, String fallbackClassName, Properties properties) Finds the implementationClass
object for the given factory. The following search order is used:ServiceLoader
lookup usingserviceClass
- Property file located as
$java.home/lib/el.properties
- System property lookup using
factoryId
- Create an instance of
fallbackClassName
- Parameters:
serviceClass
- The class to use when searching for the factory using the ServiceLoader mechanismfactoryId
- the name of the factory to find, which is a system propertyfallbackClassName
- 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:
- the
Class
object of the specified message factory; may not benull
- Throws:
ELException
- if there is an error
-