org.apache.uima.fit.factory.initializable

## 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:
    `Initializable`

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> T` | `create(org.apache.uima.UimaContext context, Class<? extends T> cls)`
    `static <T> T` | `create(org.apache.uima.UimaContext context, String className, Class<T> superClass)` Provides a way to create an instance of T.
    `static <T> Class<? extends T>` | `getClass(String className, Class<T> superClass)`
    `static void` | `initialize(Object object, org.apache.uima.UimaContext context)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### 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

Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.