Dali Provisional API
Release 3.2

org.eclipse.jpt.common.core.resource.java
Interface NestableAnnotationDefinition


public interface NestableAnnotationDefinition

Used to build NestableAnnotations discovered in the Java source code. Nestable annotations are part of a container/nestable annotation pair. Use an implementation of AnnotationProvider to provide NestableAnnotationDefinitions If the annotation is only a standalone annotation then use AnnotationDefinition instead. TODO provide an example. Somewhere in this api we need to explain how the container/nestable/standalone annotations are return via JavaResourceAnnotationElement.

Since:
3.0
See Also:
NestableAnnotation, AnnotationProvider, 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.

Nested Class Summary
static class NestableAnnotationDefinition.ContainerAnnotationNameTransformer
           
static class NestableAnnotationDefinition.NestableAnnotationNameTransformer
           
 
Field Summary
static org.eclipse.jpt.common.utility.transformer.Transformer<NestableAnnotationDefinition,String> CONTAINER_ANNOTATION_NAME_TRANSFORMER
           
static org.eclipse.jpt.common.utility.transformer.Transformer<NestableAnnotationDefinition,String> NESTABLE_ANNOTATION_NAME_TRANSFORMER
           
 
Method Summary
 NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement, int index)
          Build and return an annotation for the specified annotated element.
 NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation, int index)
          Build and return an annotation for the specified JDT annotation on the specified annotated element.
 String getContainerAnnotationName()
          Return the name of the container annotation which will be used when multiple NestableAnnotations are created
 String getElementName()
          Return the element name used when the NestableAnnotation is nested inside of the container annotation.
 String getNestableAnnotationName()
          Return the name of the annotation the definition will build in the various #build...(...) methods.
 

Field Detail

NESTABLE_ANNOTATION_NAME_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<NestableAnnotationDefinition,String> NESTABLE_ANNOTATION_NAME_TRANSFORMER

CONTAINER_ANNOTATION_NAME_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<NestableAnnotationDefinition,String> CONTAINER_ANNOTATION_NAME_TRANSFORMER
Method Detail

getNestableAnnotationName

String getNestableAnnotationName()
Return the name of the annotation the definition will build in the various #build...(...) methods.


getContainerAnnotationName

String getContainerAnnotationName()
Return the name of the container annotation which will be used when multiple NestableAnnotations are created


getElementName

String getElementName()
Return the element name used when the NestableAnnotation is nested inside of the container annotation. Typically "value".


buildAnnotation

NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent,
                                   AnnotatedElement annotatedElement,
                                   int index)
Build and return an annotation for the specified annotated element.


buildAnnotation

NestableAnnotation buildAnnotation(JavaResourceAnnotatedElement parent,
                                   IAnnotation jdtAnnotation,
                                   int index)
Build and return an annotation for the specified JDT annotation on the specified annotated element.


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.