public final class AnnotationFactory extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends Annotation> |
createAnnotation(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 Annotation> T createAnnotation(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–2020 The Apache Software Foundation. All rights reserved.