Dali Provisional API
Release 3.2

org.eclipse.jpt.common.core
Interface AnnotationProvider

All Known Implementing Classes:
GenericAnnotationProvider

public interface AnnotationProvider

This is used to provide annotations and nestable annotations. An exception will be thrown on an attempt to build an annotation that does not exist.

See Also:
This interface is not intended to be implemented. 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.

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 annotations.
 String getContainerAnnotationName(String nestableAnnotationName)
          Return the "container" annotation name for the given "nestable" annotation name.
 Iterable<String> getContainerAnnotationNames()
          Return all the supported "container" annotation names.
 String getNestableAnnotationName(String containerAnnotationName)
          Return the "nestable" annotation name for the given "container" annotation name.
 Iterable<String> getNestableAnnotationNames()
          Return all the supported "nestable" annotation names.
 String getNestableElementName(String nestableAnnotationName)
          Return the annotation "element" name used for the "nestable" annotation when it is nested within a "container" annotation.
 

Method Detail

getAnnotationNames

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


getContainerAnnotationNames

Iterable<String> getContainerAnnotationNames()
Return all the supported "container" annotation names. These are defined via the list of NestableAnnotationDefinitions. A NestableAnnotationDefinition defines its corresponding "container" annotation name. You must also provide an AnnotationDefinition for the "container" annotation.

See Also:
NestableAnnotationDefinition.getContainerAnnotationName()

getNestableAnnotationNames

Iterable<String> getNestableAnnotationNames()
Return all the supported "nestable" annotation names. These are defined via the list of NestableAnnotationDefinitions.

See Also:
NestableAnnotationDefinition.getNestableAnnotationName()

getNestableAnnotationName

String getNestableAnnotationName(String containerAnnotationName)
Return the "nestable" annotation name for the given "container" annotation name.

See Also:
NestableAnnotationDefinition

getContainerAnnotationName

String getContainerAnnotationName(String nestableAnnotationName)
Return the "container" annotation name for the given "nestable" annotation name.

See Also:
NestableAnnotationDefinition

getNestableElementName

String getNestableElementName(String nestableAnnotationName)
Return the annotation "element" name used for the "nestable" annotation when it is nested within a "container" annotation. Typically "value".

See Also:
NestableAnnotationDefinition.getElementName()

buildAnnotation

Annotation buildAnnotation(JavaResourceAnnotatedElement parent,
                           AnnotatedElement element,
                           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,
                                   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,
                           IAnnotation jdtAnnotation)
Build an annotation for the specified JDT annotation. Throw an 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. Throw an 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.