public final class AnnotationFactory extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends org.apache.uima.jcas.tcas.Annotation> |
createAnnotation(org.apache.uima.jcas.JCas jCas,
int begin,
int end,
Class<T> cls)
Provides a convenient way to create an annotation and addToIndexes in a single line.
|
public static <T extends org.apache.uima.jcas.tcas.Annotation> T createAnnotation(org.apache.uima.jcas.JCas jCas, int begin, int end, Class<T> cls)
T
- the annotation typejCas
- the JCas to create the annotation inbegin
- the begin offsetend
- the end offsetcls
- the annotation class as generated by JCasGenCopyright © 2012–2022 The Apache Software Foundation. All rights reserved.