org.eclipse.jpt.jpa.core
Interface JpaAnnotationProvider


public interface JpaAnnotationProvider

This is used to provide type and attribute 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:
3.0
See Also:
JpaAnnotationDefinitionProvider

Method Summary
 java.util.Iterator<java.lang.String> attributeAnnotationNames()
          Return the names of the annotations that can appear on an attribute.
 Annotation buildAttributeAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute, java.lang.String annotationName)
          Build an attribute annotation with the specified name.
 Annotation buildAttributeAnnotation(JavaResourcePersistentAttribute parent, org.eclipse.jdt.core.IAnnotation jdtAnnotation)
          Build an attribute annotation for the specified JDT annotation.
 Annotation buildNullAttributeAnnotation(JavaResourcePersistentAttribute parent, java.lang.String annotationName)
          Build a null attribute annotation with the specified name.
 Annotation buildNullPackageAnnotation(JavaResourcePackage parent, java.lang.String annotationName)
          Build a null package annotation with the specified name.
 Annotation buildNullTypeAnnotation(JavaResourcePersistentType parent, java.lang.String annotationName)
          Build a null type annotation with the specified name.
 Annotation buildPackageAnnotation(JavaResourcePackage parent, AnnotatedPackage pack, java.lang.String annotationName)
          Build an package annotation with the specified name.
 Annotation buildPackageAnnotation(JavaResourcePackage parent, org.eclipse.jdt.core.IAnnotation jdtAnnotation)
          Build a package annotation for the specified JDT annotation.
 Annotation buildTypeAnnotation(JavaResourcePersistentType parent, org.eclipse.jdt.core.IAnnotation jdtAnnotation)
          Build a type annotation for the specified JDT annotation.
 Annotation buildTypeAnnotation(JavaResourcePersistentType parent, Type type, java.lang.String annotationName)
          Build a type annotation with the specified name.
 java.util.Iterator<java.lang.String> packageAnnotationNames()
          Return the names of the annotations that can appear on a package.
 java.util.Iterator<java.lang.String> typeAnnotationNames()
          Return the names of the annotations that can appear on a type.
 java.util.Iterator<java.lang.String> typeMappingAnnotationNames()
          Return the names of the annotations that can appear on a type and are used to determine whether and how the type is persisted (how it is "mapped").
 

Method Detail

typeAnnotationNames

java.util.Iterator<java.lang.String> typeAnnotationNames()
Return the names of the annotations that can appear on a type.


typeMappingAnnotationNames

java.util.Iterator<java.lang.String> typeMappingAnnotationNames()
Return the names of the annotations that can appear on a type and are used to determine whether and how the type is persisted (how it is "mapped"). This should be a subset of typeAnnotationNames().


buildTypeAnnotation

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

See Also:
typeAnnotationNames()

buildTypeAnnotation

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

See Also:
typeAnnotationNames()

buildNullTypeAnnotation

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

See Also:
typeAnnotationNames()

attributeAnnotationNames

java.util.Iterator<java.lang.String> attributeAnnotationNames()
Return the names of the annotations that can appear on an attribute.


buildAttributeAnnotation

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

See Also:
attributeAnnotationNames()

buildAttributeAnnotation

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

See Also:
attributeAnnotationNames()

buildNullAttributeAnnotation

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

See Also:
attributeAnnotationNames()

packageAnnotationNames

java.util.Iterator<java.lang.String> packageAnnotationNames()
Return the names of the annotations that can appear on a package.


buildPackageAnnotation

Annotation buildPackageAnnotation(JavaResourcePackage parent,
                                  AnnotatedPackage pack,
                                  java.lang.String annotationName)
Build an package annotation with the specified name. Throw an IllegalArgumentException if the specified name is unsupported.

See Also:
packageAnnotationNames()

buildPackageAnnotation

Annotation buildPackageAnnotation(JavaResourcePackage parent,
                                  org.eclipse.jdt.core.IAnnotation jdtAnnotation)
Build a package annotation for the specified JDT annotation. Throw an IllegalArgumentException if the specified name is unsupported.

See Also:
packageAnnotationNames()

buildNullPackageAnnotation

Annotation buildNullPackageAnnotation(JavaResourcePackage parent,
                                      java.lang.String annotationName)
Build a null package annotation with the specified name. Throw an IllegalArgumentException if the specified annotation is unsupported.

See Also:
packageAnnotationNames()