Interface LegacySupportPlugin


public interface LegacySupportPlugin
INTERNAL API - Legacy support plug-in API.
  • Method Details

    • isAnnotationPresent

      boolean isAnnotationPresent(AccessibleObject aObject, Class<? extends Annotation> aAnnotationClass)
      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

      boolean isAnnotationPresent(Class<?> aObject, Class<? extends Annotation> aAnnotationClass)
      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 type
      M - 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 type
      M - 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.