Package org.apache.uima.fit.internal
Class ClassLoaderUtils
java.lang.Object
org.apache.uima.fit.internal.ClassLoaderUtils
INTERNAL API - Helper functions to obtain a suitable classloader.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClassLoader
Looks up a suitable classloader in the following order: TheUimaContext
in theUimaContextHolder
of the current thread(if any) The current thread-context classloader (if any) The classloader through which uimaFIT (i.e.static ClassLoader
findClassloader
(org.apache.uima.resource.ResourceManager aResMgr) Looks up a suitable classloader in the following order: The extension classloader of the givenResourceManager
SeefindClassloader()
static ClassLoader
findClassloader
(org.apache.uima.UimaContext aContext) Looks up a suitable classloader in the following order: The extension classloader of theResourceManager
associated with the givenUimaContext
(if any) SeefindClassloader(ResourceManager)
-
Method Details
-
findClassloader
Looks up a suitable classloader in the following order:- The
UimaContext
in theUimaContextHolder
of the current thread(if any) - The current thread-context classloader (if any)
- The classloader through which uimaFIT (i.e. this class) was loaded.
- For backwards compatibility then delegates to
ClassUtils.getDefaultClassLoader()
- Returns:
- a classloader or
null
if no suitable classloader could be found.
- The
-
findClassloader
Looks up a suitable classloader in the following order:- The extension classloader of the given
ResourceManager
- See
findClassloader()
- Returns:
- a classloader or
null
if no suitable classloader could be found.
- The extension classloader of the given
-
findClassloader
Looks up a suitable classloader in the following order:- The extension classloader of the
ResourceManager
associated with the givenUimaContext
(if any) - See
findClassloader(ResourceManager)
- Returns:
- a classloader or
null
if no suitable classloader could be found.
- The extension classloader of the
-