Class InitializableFactory

java.lang.Object
org.apache.uima.fit.factory.initializable.InitializableFactory

public final class InitializableFactory extends Object
Please see Initializable for a description of how this class is intended to be used.
See Also:
  • Method Details

    • create

      public static <T> T create(org.apache.uima.UimaContext context, String className, Class<T> superClass) throws org.apache.uima.resource.ResourceInitializationException
      Provides a way to create an instance of T. If the class specified by className implements Initializable, then the UimaContext provided here will be passed to its initialize method.
      Type Parameters:
      T - the interface type
      Parameters:
      context - the UIMA context containing the parameter settings
      className - the name of a class implementing Initializable
      superClass - a class to which the initializable class is cast
      Returns:
      a new initialized instance of the initializable class cast as the specified class
      Throws:
      org.apache.uima.resource.ResourceInitializationException - if there was a problem during initialization or instantiation
    • getClass

      public static <T> Class<? extends T> getClass(String className, Class<T> superClass) throws org.apache.uima.resource.ResourceInitializationException
      Type Parameters:
      T - the interface type
      Parameters:
      className - the name of a class implementing Initializable
      superClass - a class to which the initializable class is cast
      Returns:
      a new initialized instance of the initializable class cast as the specified class
      Throws:
      org.apache.uima.resource.ResourceInitializationException - if there was a problem casting the class
    • create

      public static <T> T create(org.apache.uima.UimaContext context, Class<? extends T> cls) throws org.apache.uima.resource.ResourceInitializationException
      Type Parameters:
      T - the interface type
      Parameters:
      context - the UIMA context containing the parameter settings
      cls - the class implementing Initializable
      Returns:
      a new initialized instance of the initializable class cast as the specified class
      Throws:
      org.apache.uima.resource.ResourceInitializationException - if there was a problem during initialization or instantiation
    • initialize

      public static void initialize(Object object, org.apache.uima.UimaContext context) throws org.apache.uima.resource.ResourceInitializationException
      Parameters:
      object - an instance of a class implementing Initializable
      context - the UIMA context containing the parameter settings
      Throws:
      org.apache.uima.resource.ResourceInitializationException - if there was a problem during initialization