Class UIMAClassLoader

All Implemented Interfaces:
Closeable, AutoCloseable

public class UIMAClassLoader extends URLClassLoader
UIMAClassLoader is used as extension ClassLoader for UIMA to load additional components like annotators and resources. The classpath of the classloader is specified as string. The strategy for this ClassLoader tries to load the class itself before the classloading is delegated to the application class loader.
  • Field Details

    • nbrLocks

      private static final int nbrLocks
      locks for loading more than 1 class at a time (on different threads) no more than the total number of cores, rounded up to pwr of 2
    • syncLocks

      private final Object[] syncLocks
  • Constructor Details

    • UIMAClassLoader

      public UIMAClassLoader(String classpath) throws MalformedURLException
      Creates a new UIMAClassLoader based on a classpath string
      Parameters:
      classpath - a classpath string
      Throws:
      MalformedURLException - if a malformed URL has occurred in the classpath string.
    • UIMAClassLoader

      public UIMAClassLoader(URL[] classpath)
      Creates a new UIMAClassLoader based on a classpath URL's
      Parameters:
      classpath - an array of wellformed classpath URL's
    • UIMAClassLoader

      public UIMAClassLoader(URL[] classpath, ClassLoader parent)
      Creates a new UIMAClassLoader based on a classpath URL's. Also a parent ClassLoader can be specified.
      Parameters:
      classpath - an array of wellformed classpath URL's
      parent - specify the parent of the classloader
    • UIMAClassLoader

      public UIMAClassLoader(String classpath, ClassLoader parent) throws MalformedURLException
      Creates a new UIMAClassLoader based on a classpath string. Also a parent ClassLoader can be specified.
      Parameters:
      classpath - a classpath string
      parent - specify the parent of the classloader
      Throws:
      MalformedURLException - if a malformed URL has occurred in the classpath string.
  • Method Details