Package org.apache.uima.internal.util
Class ClassLoaderUtils
java.lang.Object
org.apache.uima.internal.util.ClassLoaderUtils
INTERNAL API - Helper functions to obtain a suitable class loader.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClassLoaderLooks up a suitable class loader in the following order: TheUimaContextin theUimaContextHolderof the current thread(if any) The current thread-context class loader (if any) The class loader through which UIMA was loaded. Finally checks the system classloaderstatic ClassLoaderfindClassLoader(ResourceManager aResMgr) Looks up a suitable class loader in the following order: The extension class loader of the givenResourceManagerSeefindClassLoader()static ClassLoaderfindClassLoader(UimaContext aContext) Looks up a suitable class loader in the following order: The extension class loader of theResourceManagerassociated with the givenUimaContext(if any) SeefindClassLoader(ResourceManager)
-
Method Details
-
findClassLoader
Looks up a suitable class loader in the following order:- The
UimaContextin theUimaContextHolderof the current thread(if any) - The current thread-context class loader (if any)
- The class loader through which UIMA was loaded.
- Finally checks the system classloader
- Returns:
- a class loader or
nullif no suitable class loader could be found.
- The
-
findClassLoader
Looks up a suitable class loader in the following order:- The extension class loader of the given
ResourceManager - See
findClassLoader()
- Returns:
- a class loader or
nullif no suitable class loader could be found.
- The extension class loader of the given
-
findClassLoader
Looks up a suitable class loader in the following order:- The extension class loader of the
ResourceManagerassociated with the givenUimaContext(if any) - See
findClassLoader(ResourceManager)
- Returns:
- a class loader or
nullif no suitable class loader could be found.
- The extension class loader of the
-