Class ClassLoaderUtils

java.lang.Object
org.apache.uima.internal.util.ClassLoaderUtils

public final class ClassLoaderUtils extends Object
INTERNAL API - Helper functions to obtain a suitable class loader.
  • Method Details

    • findClassLoader

      public static ClassLoader findClassLoader()
      Looks up a suitable class loader in the following order:
      1. The UimaContext in the UimaContextHolder of the current thread(if any)
      2. The current thread-context class loader (if any)
      3. The class loader through which uimaFIT (i.e. this class) was loaded.
      4. For backwards compatibility then delegates to getDefaultClassLoader()
      Returns:
      a class loader or null if no suitable class loader could be found.
    • findClassLoader

      public static ClassLoader findClassLoader(ResourceManager aResMgr)
      Looks up a suitable class loader in the following order:
      1. The extension class loader of the given ResourceManager
      2. See findClassLoader()
      Returns:
      a class loader or null if no suitable class loader could be found.
    • findClassLoader

      public static ClassLoader findClassLoader(UimaContext aContext)
      Looks up a suitable class loader in the following order:
      1. The extension class loader of the ResourceManager associated with the given UimaContext (if any)
      2. See findClassLoader(ResourceManager)
      Returns:
      a class loader or null if no suitable class loader could be found.