Package org.apache.uima.fit.internal
Interface LegacySupportPlugin
public interface LegacySupportPlugin
INTERNAL API - Legacy support plug-in API.
-
Method Summary
Modifier and TypeMethodDescription<L extends Annotation,
M extends Annotation>
MgetAnnotation
(Class<?> aObject, Class<M> aAnnotationClass) Gets the annotation from the given object.<L extends Annotation,
M extends Annotation>
MgetAnnotation
(AccessibleObject aObject, Class<M> aAnnotationClass) Gets the annotation from the given object.boolean
isAnnotationPresent
(Class<?> aObject, Class<? extends Annotation> aAnnotationClass) Checks if a legacy version of the given modern annotation is present.boolean
isAnnotationPresent
(AccessibleObject aObject, Class<? extends Annotation> aAnnotationClass) Checks if a legacy version of the given modern annotation is present.String[]
scanTypeDescriptors
(MetaDataType aType) Get all currently accessible descriptor locations for the given type.
-
Method Details
-
isAnnotationPresent
Checks if a legacy version of the given modern annotation is present.- Parameters:
aObject
- an object that might have a legacy annotation.aAnnotationClass
- the modern annotation type.- Returns:
true
if a legacy version of the annotation is present.
-
isAnnotationPresent
Checks if a legacy version of the given modern annotation is present.- Parameters:
aObject
- an object that might have a legacy annotation.aAnnotationClass
- the modern annotation type.- Returns:
true
if a legacy version of the annotation is present.
-
getAnnotation
<L extends Annotation,M extends Annotation> M getAnnotation(AccessibleObject aObject, Class<M> aAnnotationClass) Gets the annotation from the given object. Instead of looking for the given modern annotation, this method looks for a legacy version of the annotation, converts it to a modern annotation and returns that.- Type Parameters:
L
- legacy annotation typeM
- modern annotation type- Parameters:
aObject
- an object that has a legacy annotation.aAnnotationClass
- the modern annotation type.- Returns:
- an instance of the modern annotation filled with the data from the legacy annotation.
-
getAnnotation
<L extends Annotation,M extends Annotation> M getAnnotation(Class<?> aObject, Class<M> aAnnotationClass) Gets the annotation from the given object. Instead of looking for the given modern annotation, this method looks for a legacy version of the annotation, converts it to a modern annotation and returns that.- Type Parameters:
L
- legacy annotation typeM
- modern annotation type- Parameters:
aObject
- an object that has a legacy annotation.aAnnotationClass
- the modern annotation type.- Returns:
- an instance of the modern annotation filled with the data from the legacy annotation.
-
scanTypeDescriptors
String[] scanTypeDescriptors(MetaDataType aType) throws org.apache.uima.resource.ResourceInitializationException Get all currently accessible descriptor locations for the given type.- Parameters:
aType
- the type of metadata to scan for- Returns:
- an array of locations.
- Throws:
org.apache.uima.resource.ResourceInitializationException
- if the locations could not be resolved.
-