org.eclipse.jpt.core.resource.java
Interface AnnotationContainer<T extends NestableAnnotation>

All Known Subinterfaces:
AssociationOverridesAnnotation, AttributeOverridesAnnotation, ContainerAnnotation<T>, JoinColumnsAnnotation, NamedNativeQueriesAnnotation, NamedQueriesAnnotation, PrimaryKeyJoinColumnsAnnotation, SecondaryTablesAnnotation

public interface AnnotationContainer<T extends NestableAnnotation>

Common behavior for all annotation "containers". 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
 T addNestedAnnotationInternal()
          Add a nested annotation to the container without firing change notification.
 java.lang.String getContainerAnnotationName()
          Return the name of the container annotation.
 org.eclipse.jdt.core.dom.Annotation getContainerJdtAnnotation(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
          Return the corresponding JDT DOM annotation from the specified AST compilation unit.
 java.lang.String getElementName()
          Return the name of the container annotation's element that is used to indicate the nested annotations (typically "value").
 java.lang.String getNestableAnnotationName()
          Return the name of the nested annotations held by the container.
 T moveNestedAnnotationInternal(int targetIndex, int sourceIndex)
          Move the nested annotation at the specified source index in the container to the specified target index without firing change notification.
 void nestedAnnotationAdded(int index, T nestedAnnotation)
          The specified nested annotation was added to the container at the specified index; notify interested parties.
 void nestedAnnotationMoved(int targetIndex, int sourceIndex)
          A nested annotation was moved within the container annotation from the specified source index to the specified target index; notify interested parties.
 void nestedAnnotationRemoved(int index, T nestedAnnotation)
          The specified nested annotation was removed from the container at the specified index; notify interested parties.
 java.util.ListIterator<T> nestedAnnotations()
          Return the nested annotations held by the container.
 int nestedAnnotationsSize()
          Return the number of nested annotations held by the container.
 T removeNestedAnnotationInternal(int index)
          Remove the nested annotation at the specified index from the container without firing change notification.
 

Method Detail

getContainerAnnotationName

java.lang.String getContainerAnnotationName()
Return the name of the container annotation. Used when traversing the AST.


getContainerJdtAnnotation

org.eclipse.jdt.core.dom.Annotation getContainerJdtAnnotation(org.eclipse.jdt.core.dom.CompilationUnit astRoot)
Return the corresponding JDT DOM annotation from the specified AST compilation unit. Used as a starting point when traversing the AST.


getElementName

java.lang.String getElementName()
Return the name of the container annotation's element that is used to indicate the nested annotations (typically "value"). Used when traversing the AST.


getNestableAnnotationName

java.lang.String getNestableAnnotationName()
Return the name of the nested annotations held by the container. Used when traversing the AST.


nestedAnnotations

java.util.ListIterator<T> nestedAnnotations()
Return the nested annotations held by the container.


nestedAnnotationsSize

int nestedAnnotationsSize()
Return the number of nested annotations held by the container.


addNestedAnnotationInternal

T addNestedAnnotationInternal()
Add a nested annotation to the container without firing change notification.


nestedAnnotationAdded

void nestedAnnotationAdded(int index,
                           T nestedAnnotation)
The specified nested annotation was added to the container at the specified index; notify interested parties.


moveNestedAnnotationInternal

T moveNestedAnnotationInternal(int targetIndex,
                               int sourceIndex)
Move the nested annotation at the specified source index in the container to the specified target index without firing change notification. Return the moved nested annotation.


nestedAnnotationMoved

void nestedAnnotationMoved(int targetIndex,
                           int sourceIndex)
A nested annotation was moved within the container annotation from the specified source index to the specified target index; notify interested parties.


removeNestedAnnotationInternal

T removeNestedAnnotationInternal(int index)
Remove the nested annotation at the specified index from the container without firing change notification.


nestedAnnotationRemoved

void nestedAnnotationRemoved(int index,
                             T nestedAnnotation)
The specified nested annotation was removed from the container at the specified index; notify interested parties.