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(UimaContext context, String className, Class<T> superClass) throws 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:
      ResourceInitializationException - if there was a problem during initialization or instantiation
    • getClass

      public static <T> Class<? extends T> getClass(String className, Class<T> superClass) throws 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:
      ResourceInitializationException - if there was a problem casting the class
    • create

      public static <T> T create(UimaContext context, Class<? extends T> cls) throws 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:
      ResourceInitializationException - if there was a problem during initialization or instantiation
    • initialize

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