Class ClassLoaderUtils

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

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

    • findClassloader

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

      public static ClassLoader findClassloader(org.apache.uima.resource.ResourceManager aResMgr)
      Looks up a suitable classloader in the following order:
      1. The extension classloader of the given ResourceManager
      2. See findClassloader()
      Returns:
      a classloader or null if no suitable classloader could be found.
    • findClassloader

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