Dali Provisional API
Release 3.2

org.eclipse.jpt.common.core
Interface AnnotationProvider


public interface AnnotationProvider

This is used to provide annotations and nestable annotations. The provider will throw an exception with any attempt to build an unknown annotation.

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.

See Also:
JavaResourceAnnotatedElement, SimpleAnnotationProvider

Method Summary
 Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element, String annotationName)
          Build an annotation with the specified name.
 NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement element, String annotationName, int index)
          Build a nestable annotation with the specified name and index.
 Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation)
          Build an annotation for the specified JDT annotation.
 NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation, int index)
          Build a nestable annotation for the specified JDT annotation and index.
 Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent, String annotationName)
          Build a null annotation with the specified name.
 Iterable<String> getAnnotationNames()
          Return the names of the supported annotations.
 String getContainerAnnotationName(String nestableAnnotationName)
          Return the name of the container annotation for the specified nestable annotation.
 Iterable<String> getContainerAnnotationNames()
          Return the names of the supported container annotations.
 String getNestableAnnotationName(String containerAnnotationName)
          Return the name of the nestable annotation for the specified container annotation.
 Iterable<String> getNestableAnnotationNames()
          Return the names of the supported nestable annotations.
 String getNestableElementName(String nestableAnnotationName)
          Return the name of the container annotation's element whose value is the nestable annotation(s) (typically "value").
 

Method Detail

getAnnotationNames

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


getContainerAnnotationNames

Iterable<String> getContainerAnnotationNames()
Return the names of the supported container annotations.

See Also:
NestableAnnotationDefinition.getContainerAnnotationName()

getNestableAnnotationNames

Iterable<String> getNestableAnnotationNames()
Return the names of the supported nestable annotations.

See Also:
NestableAnnotationDefinition.getNestableAnnotationName()

getNestableAnnotationName

String getNestableAnnotationName(String containerAnnotationName)
Return the name of the nestable annotation for the specified container annotation.

See Also:
NestableAnnotationDefinition

getContainerAnnotationName

String getContainerAnnotationName(String nestableAnnotationName)
Return the name of the container annotation for the specified nestable annotation.

See Also:
NestableAnnotationDefinition

getNestableElementName

String getNestableElementName(String nestableAnnotationName)
Return the name of the container annotation's element whose value is the nestable annotation(s) (typically "value").

See Also:
NestableAnnotationDefinition.getElementName()

buildAnnotation

Annotation buildAnnotation(JavaResourceAnnotatedElement parent,
                           AnnotatedElement element,
                           String annotationName)
Build an annotation with the specified name.

Throws:
IllegalArgumentException - if the specified annotation is unsupported
See Also:
getAnnotationNames()

buildAnnotation

NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent,
                                   AnnotatedElement element,
                                   String annotationName,
                                   int index)
Build a nestable annotation with the specified name and index.

Throws:
IllegalArgumentException - if the specified annotation is unsupported
See Also:
getNestableAnnotationNames()

buildAnnotation

Annotation buildAnnotation(JavaResourceAnnotatedElement parent,
                           IAnnotation jdtAnnotation)
Build an annotation for the specified JDT annotation.

Throws:
IllegalArgumentException - if the specified annotation is unsupported
See Also:
getAnnotationNames()

buildAnnotation

NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent,
                                   IAnnotation jdtAnnotation,
                                   int index)
Build a nestable annotation for the specified JDT annotation and index.

Throws:
IllegalArgumentException - if the specified annotation is unsupported
See Also:
getNestableAnnotationNames()

buildNullAnnotation

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

See Also:
getAnnotationNames()

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.