org.eclipse.jpt.jaxb.core
Interface AnnotationProvider


public interface AnnotationProvider

This is used to provide type and attribute annotations. Also provides list of supported annotation names, check the appropriate list before trying to build an annotation with that name. An exception will be thrown on an attempt to build an annotation that does not exist. This interface is not intended to be implemented. Instead implement AnnotationDefinitionProvider to extend the list of supported annotation definitions.

Since:
3.0 Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
Version:
3.0
See Also:
AnnotationDefinitionProvider

Method Summary
 Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element, java.lang.String annotationName)
          Build an annotation with the specified name.
 NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element, java.lang.String annotationName, int index)
          Build a nestable annotation with the specified name and index.
 Annotation buildAnnotation(JavaResourceAnnotatedElement parent, org.eclipse.jdt.core.IAnnotation jdtAnnotation)
          Build an annotation for the specified JDT annotation.
 Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent, java.lang.String annotationName)
          Build a null annotation with the specified name.
 java.lang.Iterable<java.lang.String> getAnnotationNames()
          Return the names of the annotations.
 java.lang.Iterable<java.lang.String> getContainerAnnotationNames()
           
 java.lang.String getNestableAnnotationName(java.lang.String containerAnnotationName)
           
 java.lang.Iterable<java.lang.String> getNestableAnnotationNames()
           
 java.lang.String getNestableElementName(java.lang.String nestableAnnotationName)
           
 

Method Detail

getAnnotationNames

java.lang.Iterable<java.lang.String> getAnnotationNames()
Return the names of the annotations.


getContainerAnnotationNames

java.lang.Iterable<java.lang.String> getContainerAnnotationNames()

getNestableAnnotationNames

java.lang.Iterable<java.lang.String> getNestableAnnotationNames()

getNestableAnnotationName

java.lang.String getNestableAnnotationName(java.lang.String containerAnnotationName)

getNestableElementName

java.lang.String getNestableElementName(java.lang.String nestableAnnotationName)

buildAnnotation

Annotation buildAnnotation(JavaResourceAnnotatedElement parent,
                           AnnotatedElement element,
                           java.lang.String annotationName)
Build an annotation with the specified name. Throw an IllegalArgumentException if the specified name is unsupported.

See Also:
getAnnotationNames()

buildAnnotation

NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent,
                                   AnnotatedElement element,
                                   java.lang.String annotationName,
                                   int index)
Build a nestable annotation with the specified name and index. Throw an IllegalArgumentException if the specified name is unsupported.

See Also:
getNestableAnnotationNames()

buildAnnotation

Annotation buildAnnotation(JavaResourceAnnotatedElement parent,
                           org.eclipse.jdt.core.IAnnotation jdtAnnotation)
Build an annotation for the specified JDT annotation. Throw an IllegalArgumentException if the specified annotation is unsupported.

See Also:
getAnnotationNames()

buildNullAnnotation

Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent,
                               java.lang.String annotationName)
Build a null annotation with the specified name. Throw an IllegalArgumentException if the specified annotation is unsupported.

See Also:
getAnnotationNames()