Class FactoryFinder
java.lang.Object
javax.ws.rs.ext.FactoryFinder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static ObjectFinds the implementationClassobject for the given factory name, or if that fails, finds theClassobject for the given fallback class name.(package private) static ClassLoaderprivate static ClassLoaderprivate static ObjectnewInstance(String className, ClassLoader classLoader) Creates an instance of the specified class using the specifiedClassLoaderobject.
-
Field Details
-
LOGGER
-
RESTEASY_JAXRS_API_MODULE
- See Also:
-
-
Constructor Details
-
FactoryFinder
private FactoryFinder()
-
-
Method Details
-
getContextClassLoader
-
newInstance
private static Object newInstance(String className, ClassLoader classLoader) throws ClassNotFoundException Creates an instance of the specified class using the specifiedClassLoaderobject.- Parameters:
className- name of the class to be instantiated.classLoader- class loader to be used.- Returns:
- instance of the specified class.
- Throws:
ClassNotFoundException- if the given class could not be found or could not be instantiated.
-
find
Finds the implementationClassobject for the given factory name, or if that fails, finds theClassobject 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:
factoryId- the name of the factory to find, which is a system property.fallbackClassName- the implementation class name, which is to be used only if nothing else. is found;nullto indicate that there is no fallback class name.- Returns:
- the
Classobject of the specified message factory; may not benull. - Throws:
ClassNotFoundException- if there is an error.
-
getModuleClassLoader
-