org.eclipse.jpt.core
Interface JpaAnnotationProvider


public interface JpaAnnotationProvider

This is used to provide type and attribute mapping and supporting 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 JpaAnnotationDefinitionProvider to extend the list of supported annotation definitions.

Since:
2.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:
2.2
See Also:
JpaAnnotationDefinitionProvider

Method Summary
 java.util.ListIterator<java.lang.String> attributeMappingAnnotationNames()
          Return the names of the mapping annotations that can modify an attribute.
 java.util.ListIterator<java.lang.String> attributeSupportingAnnotationNames()
          Return the names of the supporting annotations that can modify an attribute.
 Annotation buildAttributeMappingAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute, java.lang.String annotationName)
          Build an attribute mapping annotation with the specified name.
 Annotation buildAttributeMappingAnnotation(JavaResourcePersistentAttribute parent, org.eclipse.jdt.core.IAnnotation jdtAnnotation)
          Build an attribute mapping annotation for the specified JDT annotation.
 Annotation buildAttributeSupportingAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute, java.lang.String annotationName)
          Build an attribute supporting annotation with the specified name.
 Annotation buildAttributeSupportingAnnotation(JavaResourcePersistentAttribute parent, org.eclipse.jdt.core.IAnnotation jdtAnnotation)
          Build an attribute supporting annotation for the specified JDT annotation.
 Annotation buildNullAttributeMappingAnnotation(JavaResourcePersistentAttribute parent, java.lang.String annotationName)
          Build a null attribute mapping annotation with the specified name.
 Annotation buildNullAttributeSupportingAnnotation(JavaResourcePersistentAttribute parent, java.lang.String annotationName)
          Build a null attribute supporting annotation with the specified name.
 Annotation buildNullTypeSupportingAnnotation(JavaResourcePersistentType parent, java.lang.String annotationName)
          Build a null type supporting annotation with the specified name.
 Annotation buildTypeMappingAnnotation(JavaResourcePersistentType parent, org.eclipse.jdt.core.IAnnotation jdtAnnotation)
          Build a type mapping annotation for the specified JDT annotation.
 Annotation buildTypeMappingAnnotation(JavaResourcePersistentType parent, Type type, java.lang.String annotationName)
          Build a type mapping annotation with the specified name.
 Annotation buildTypeSupportingAnnotation(JavaResourcePersistentType parent, org.eclipse.jdt.core.IAnnotation jdtAnnotation)
          Build a type supporting annotation for the specified JDT annotation.
 Annotation buildTypeSupportingAnnotation(JavaResourcePersistentType parent, Type type, java.lang.String annotationName)
          Build a type supporting annotation with the specified name.
 java.util.ListIterator<java.lang.String> typeMappingAnnotationNames()
          Return the names of the mapping annotations that can modify a type.
 java.util.ListIterator<java.lang.String> typeSupportingAnnotationNames()
          Return the names of the supporting annotations that can modify a type.
 

Method Detail

typeMappingAnnotationNames

java.util.ListIterator<java.lang.String> typeMappingAnnotationNames()
Return the names of the mapping annotations that can modify a type.


buildTypeMappingAnnotation

Annotation buildTypeMappingAnnotation(JavaResourcePersistentType parent,
                                      Type type,
                                      java.lang.String annotationName)
Build a type mapping annotation with the specified name. Throw an IllegalArgumentException if the specified name is unsupported.

See Also:
typeMappingAnnotationNames()

buildTypeMappingAnnotation

Annotation buildTypeMappingAnnotation(JavaResourcePersistentType parent,
                                      org.eclipse.jdt.core.IAnnotation jdtAnnotation)
Build a type mapping annotation for the specified JDT annotation. Throw an IllegalArgumentException if the specified annotation is unsupported.

See Also:
typeMappingAnnotationNames()

typeSupportingAnnotationNames

java.util.ListIterator<java.lang.String> typeSupportingAnnotationNames()
Return the names of the supporting annotations that can modify a type.


buildTypeSupportingAnnotation

Annotation buildTypeSupportingAnnotation(JavaResourcePersistentType parent,
                                         Type type,
                                         java.lang.String annotationName)
Build a type supporting annotation with the specified name. Throw an IllegalArgumentException if the specified name is unsupported.

See Also:
typeSupportingAnnotationNames()

buildTypeSupportingAnnotation

Annotation buildTypeSupportingAnnotation(JavaResourcePersistentType parent,
                                         org.eclipse.jdt.core.IAnnotation jdtAnnotation)
Build a type supporting annotation for the specified JDT annotation. Throw an IllegalArgumentException if the specified annotation is unsupported.

See Also:
typeSupportingAnnotationNames()

buildNullTypeSupportingAnnotation

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

See Also:
typeSupportingAnnotationNames()

attributeMappingAnnotationNames

java.util.ListIterator<java.lang.String> attributeMappingAnnotationNames()
Return the names of the mapping annotations that can modify an attribute.


buildAttributeMappingAnnotation

Annotation buildAttributeMappingAnnotation(JavaResourcePersistentAttribute parent,
                                           Attribute attribute,
                                           java.lang.String annotationName)
Build an attribute mapping annotation with the specified name. Throw an IllegalArgumentException if the specified name is unsupported.

See Also:
attributeMappingAnnotationNames()

buildAttributeMappingAnnotation

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

See Also:
attributeMappingAnnotationNames()

buildNullAttributeMappingAnnotation

Annotation buildNullAttributeMappingAnnotation(JavaResourcePersistentAttribute parent,
                                               java.lang.String annotationName)
Build a null attribute mapping annotation with the specified name. Throw an IllegalArgumentException if the specified annotation is unsupported. This is used by an attribute's "default" mapping, since there is no annotation present (thus the "default" part...).

See Also:
attributeMappingAnnotationNames()

attributeSupportingAnnotationNames

java.util.ListIterator<java.lang.String> attributeSupportingAnnotationNames()
Return the names of the supporting annotations that can modify an attribute.


buildAttributeSupportingAnnotation

Annotation buildAttributeSupportingAnnotation(JavaResourcePersistentAttribute parent,
                                              Attribute attribute,
                                              java.lang.String annotationName)
Build an attribute supporting annotation with the specified name. Throw an IllegalArgumentException if the specified name is unsupported.

See Also:
attributeSupportingAnnotationNames()

buildAttributeSupportingAnnotation

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

See Also:
attributeSupportingAnnotationNames()

buildNullAttributeSupportingAnnotation

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

See Also:
attributeSupportingAnnotationNames()