public final class InitializableFactory extends Object
Initializable
for a description of how this class is intended to be used.Initializable
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) |
public static <T> T create(org.apache.uima.UimaContext context, String className, Class<T> superClass) throws org.apache.uima.resource.ResourceInitializationException
Initializable
, then the UimaContext provided here will be passed to its initialize
method.T
- the interface typecontext
- the UIMA context containing the parameter settingsclassName
- the name of a class implementing Initializable
superClass
- a class to which the initializable class is castorg.apache.uima.resource.ResourceInitializationException
- if there was a problem during initialization or instantiationpublic static <T> Class<? extends T> getClass(String className, Class<T> superClass) throws org.apache.uima.resource.ResourceInitializationException
T
- the interface typeclassName
- the name of a class implementing Initializable
superClass
- a class to which the initializable class is castorg.apache.uima.resource.ResourceInitializationException
- if there was a problem casting the classpublic static <T> T create(org.apache.uima.UimaContext context, Class<? extends T> cls) throws org.apache.uima.resource.ResourceInitializationException
T
- the interface typecontext
- the UIMA context containing the parameter settingscls
- the class implementing Initializable
org.apache.uima.resource.ResourceInitializationException
- if there was a problem during initialization or instantiationpublic static void initialize(Object object, org.apache.uima.UimaContext context) throws org.apache.uima.resource.ResourceInitializationException
object
- an instance of a class implementing Initializable
context
- the UIMA context containing the parameter settingsorg.apache.uima.resource.ResourceInitializationException
- if there was a problem during initializationCopyright © 2012–2022 The Apache Software Foundation. All rights reserved.