Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2010-10-12 16:58:38 -0400
committerkmoore2010-10-12 16:58:38 -0400
commit5ff7c6963dfaf6200d3dc1c0e7dfb789bb7693f8 (patch)
tree1c2ead4272e07c9070e5188942c23e44ef46b469
parent8bd2f0628732a49f4b470ed5cfaa4c33bfc27a28 (diff)
downloadwebtools.dali-5ff7c6963dfaf6200d3dc1c0e7dfb789bb7693f8.tar.gz
webtools.dali-5ff7c6963dfaf6200d3dc1c0e7dfb789bb7693f8.tar.xz
webtools.dali-5ff7c6963dfaf6200d3dc1c0e7dfb789bb7693f8.zip
327609 - refactor Member hierarchy to include an AnnotatedElement interface in preparation for package annotation support.
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaGeneratorContainer.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaQueryContainer.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java28
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaQueryContainer.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverride1_0Annotation.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverrides1_0Annotation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Access2_0AnnotationDefinition.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverride2_0AnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverrides2_0AnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Cacheable2_0AnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/CollectionTable2_0AnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/ElementCollection2_0AnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/GeneratedAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyClass2_0AnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyColumn2_0AnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyEnumerated2_0AnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumn2_0AnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumns2_0AnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyTemporal2_0AnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapsId2_0AnnotationDefinition.java15
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQueries2_0AnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQuery2_0AnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/OrderColumn2_0AnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SequenceGenerator2_0AnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumn2_0Annotation.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumns2_0Annotation.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/StaticMetamodelAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAccess2_0Annotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverride2_0Annotation.java18
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverrides2_0Annotation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCacheable2_0Annotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCollectionTable2_0Annotation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceElementCollection2_0Annotation.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceGeneratedAnnotation.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyClass2_0Annotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapsId2_0Annotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQueries2_0Annotation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQuery2_0Annotation.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceStaticMetamodelAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverrideAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverridesAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverrideAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverridesAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/BasicAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ColumnAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorColumnAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorValueAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddableAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedIdAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EntityAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EnumeratedAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/GeneratedValueAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdClassAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/InheritanceAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnsAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinTableAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/LobAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToManyAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToOneAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MapKeyAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MappedSuperclassAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueriesAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueryAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueriesAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueryAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToManyAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToOneAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OrderByAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnsAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTableAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTablesAnnotationDefinition.java13
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SequenceGeneratorAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableGeneratorAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TemporalAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TransientAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/VersionAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAnnotatedElement.java207
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentAttribute.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentMember.java136
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentType.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAnnotatedElement.java441
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAnnotation.java18
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAssociationOverrideAnnotation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverrideAnnotation.java18
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverridesAnnotation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseColumnAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseEnumeratedAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseJoinColumnAnnotation.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseNamedQueryAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTableAnnotation.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTemporalAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBasicAnnotation.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorColumnAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorValueAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEntityAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratedValueAnnotation.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratorAnnotation.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceIdClassAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceInheritanceAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnAnnotation.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnsAnnotation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinTableAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceMapKeyAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedColumnAnnotation.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueriesAnnotation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueryAnnotation.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueries1_0Annotation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueryAnnotation.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOrderByAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOverrideAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentAttribute.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentMember.java411
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentType.java38
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnAnnotation.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnsAnnotation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceQueryHintAnnotation.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceRelationshipMappingAnnotation.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTableAnnotation.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTablesAnnotation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTableGeneratorAnnotation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceUniqueConstraintAnnotation.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractAnnotationAdapter.java36
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AnnotatedElementAnnotationElementAdapter.java (renamed from jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberAnnotationElementAdapter.java)30
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ElementAnnotationAdapter.java (renamed from jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberAnnotationAdapter.java)12
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ElementIndexedAnnotationAdapter.java (renamed from jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberIndexedAnnotationAdapter.java)16
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTAnnotatedElement.java204
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTFieldAttribute.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMember.java165
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMethodAttribute.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTModifiedDeclaration.java49
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTType.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitAnnotationElementAdapter.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitArrayAnnotationElementAdapter.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AnnotationDefinition.java16
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourceAnnotatedElement.java127
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentMember.java108
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/AnnotatedElement.java80
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/Member.java56
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkBasicCollectionAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkBasicMapAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkCacheAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkChangeTrackingAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkConvertAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkConverterAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkCustomizerAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkExistenceCheckingAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkJoinFetchAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkMutableAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkObjectTypeConverterAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkPrimaryKeyAnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkPrivateOwnedAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkReadOnlyAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkReadTransformerAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkStructConverterAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkTransformationAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkTypeConverterAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkVariableOneToOneAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkWriteTransformerAnnotationDefinition.java14
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceBaseEclipseLinkTypeConverterAnnotation.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCacheAnnotation.java26
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkChangeTrackingAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConversionValueAnnotation.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConvertAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConverterAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCustomizerAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkExistenceCheckingAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkJoinFetchAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkMutableAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkNamedConverterAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkObjectTypeConverterAnnotation.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkStructConverterAnnotation.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTimeOfDayAnnotation.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTransformationAnnotation.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTransformerAnnotation.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkWriteTransformerAnnotation.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v2_1/resource/java/EclipseLinkClassExtractor2_1AnnotationDefinition.java12
-rw-r--r--jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v2_1/resource/java/source/SourceEclipseLinkClassExtractorAnnotation2_1.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/java/JavaResourcePersistentAttributeTests.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/java/JavaResourcePersistentTypeTests.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/CombinationIndexedDeclarationAnnotationAdapterTests.java102
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/MemberAnnotationElementAdapterTests.java224
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/NestedDeclarationAnnotationAdapterTests.java48
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/NestedIndexedDeclarationAnnotationAdapterTests.java198
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/SimpleDeclarationAnnotationAdapterTests.java34
189 files changed, 2396 insertions, 2033 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaGeneratorContainer.java
index 01e98a4fe5..02e6b41741 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaGeneratorContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaGeneratorContainer.java
@@ -10,7 +10,7 @@
package org.eclipse.jpt.core.context.java;
import org.eclipse.jpt.core.context.GeneratorContainer;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
/**
* Provisional API: This interface is part of an interim API that is still
@@ -19,7 +19,7 @@ import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.0
* @since 2.3
*/
public interface JavaGeneratorContainer
@@ -33,12 +33,12 @@ public interface JavaGeneratorContainer
JavaTableGenerator addTableGenerator();
- void initialize(JavaResourcePersistentMember jrpm);
+ void initialize(JavaResourceAnnotatedElement jrae);
/**
- * Update the JavaGeneratorContainer context model object to match the JavaResourcePersistentMember
+ * Update the JavaGeneratorContainer context model object to match the JavaResourceAnnotatedElement
* resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
*/
- void update(JavaResourcePersistentMember jrpm);
+ void update(JavaResourceAnnotatedElement jrae);
} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaQueryContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaQueryContainer.java
index 7aa11f8585..8b46cc0775 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaQueryContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/context/java/JavaQueryContainer.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.core.context.java;
import java.util.ListIterator;
import org.eclipse.jpt.core.context.QueryContainer;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
/**
* Provisional API: This interface is part of an interim API that is still
@@ -20,7 +20,7 @@ import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.0
* @since 2.3
*/
public interface JavaQueryContainer
@@ -36,12 +36,12 @@ public interface JavaQueryContainer
JavaNamedNativeQuery addNamedNativeQuery(int index);
- void initialize(JavaResourcePersistentMember jrpm);
+ void initialize(JavaResourceAnnotatedElement jrae);
/**
- * Update the JavaGeneratorContainer context model object to match the JavaResourcePersistentMember
+ * Update the JavaQueryContainer context model object to match the JavaResourceAnnotatedElement
* resource model object. see {@link org.eclipse.jpt.core.JpaProject#update()}
*/
- void update(JavaResourcePersistentMember jrpm);
+ void update(JavaResourceAnnotatedElement jrae);
} \ No newline at end of file
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java
index 1f4586a705..63c1b24ad0 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaGeneratorContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -22,7 +22,7 @@ import org.eclipse.jpt.core.context.java.JavaTableGenerator;
import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.SequenceGeneratorAnnotation;
import org.eclipse.jpt.core.resource.java.TableGeneratorAnnotation;
import org.eclipse.jpt.core.utility.TextRange;
@@ -33,7 +33,7 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public class GenericJavaGeneratorContainer extends AbstractJavaJpaContextNode
implements JavaGeneratorContainer
{
- protected JavaResourcePersistentMember javaResourcePersistentMember;
+ protected JavaResourceAnnotatedElement javaResourceAnnotatedElement;
protected JavaSequenceGenerator sequenceGenerator;
@@ -54,7 +54,7 @@ public class GenericJavaGeneratorContainer extends AbstractJavaJpaContextNode
}
this.tableGenerator = getJpaFactory().buildJavaTableGenerator(this);
TableGeneratorAnnotation tableGeneratorResource =
- (TableGeneratorAnnotation) this.javaResourcePersistentMember.
+ (TableGeneratorAnnotation) this.javaResourceAnnotatedElement.
addAnnotation(TableGeneratorAnnotation.ANNOTATION_NAME);
this.tableGenerator.initialize(tableGeneratorResource);
firePropertyChanged(TABLE_GENERATOR_PROPERTY, null, this.tableGenerator);
@@ -67,7 +67,7 @@ public class GenericJavaGeneratorContainer extends AbstractJavaJpaContextNode
}
JavaTableGenerator oldTableGenerator = this.tableGenerator;
this.tableGenerator = null;
- this.javaResourcePersistentMember.removeAnnotation(TableGeneratorAnnotation.ANNOTATION_NAME);
+ this.javaResourceAnnotatedElement.removeAnnotation(TableGeneratorAnnotation.ANNOTATION_NAME);
firePropertyChanged(TABLE_GENERATOR_PROPERTY, oldTableGenerator, null);
}
@@ -87,7 +87,7 @@ public class GenericJavaGeneratorContainer extends AbstractJavaJpaContextNode
}
this.sequenceGenerator = getJpaFactory().buildJavaSequenceGenerator(this);
SequenceGeneratorAnnotation sequenceGeneratorResource =
- (SequenceGeneratorAnnotation) this.javaResourcePersistentMember.
+ (SequenceGeneratorAnnotation) this.javaResourceAnnotatedElement.
addAnnotation(SequenceGeneratorAnnotation.ANNOTATION_NAME);
this.sequenceGenerator.initialize(sequenceGeneratorResource);
firePropertyChanged(SEQUENCE_GENERATOR_PROPERTY, null, this.sequenceGenerator);
@@ -100,7 +100,7 @@ public class GenericJavaGeneratorContainer extends AbstractJavaJpaContextNode
}
JavaSequenceGenerator oldSequenceGenerator = this.sequenceGenerator;
this.sequenceGenerator = null;
- this.javaResourcePersistentMember.removeAnnotation(SequenceGeneratorAnnotation.ANNOTATION_NAME);
+ this.javaResourceAnnotatedElement.removeAnnotation(SequenceGeneratorAnnotation.ANNOTATION_NAME);
firePropertyChanged(SEQUENCE_GENERATOR_PROPERTY, oldSequenceGenerator,null);
}
@@ -115,8 +115,8 @@ public class GenericJavaGeneratorContainer extends AbstractJavaJpaContextNode
}
- public void initialize(JavaResourcePersistentMember jrpm) {
- this.javaResourcePersistentMember = jrpm;
+ public void initialize(JavaResourceAnnotatedElement jrae) {
+ this.javaResourceAnnotatedElement = jrae;
this.initializeTableGenerator();
this.initializeSequenceGenerator();
}
@@ -135,8 +135,8 @@ public class GenericJavaGeneratorContainer extends AbstractJavaJpaContextNode
}
}
- public void update(JavaResourcePersistentMember jrpm) {
- this.javaResourcePersistentMember = jrpm;
+ public void update(JavaResourceAnnotatedElement jrae) {
+ this.javaResourceAnnotatedElement = jrae;
this.updateTableGenerator();
this.updateSequenceGenerator();
}
@@ -165,7 +165,7 @@ public class GenericJavaGeneratorContainer extends AbstractJavaJpaContextNode
}
protected TableGeneratorAnnotation getResourceTableGenerator() {
- return (TableGeneratorAnnotation) this.javaResourcePersistentMember.
+ return (TableGeneratorAnnotation) this.javaResourceAnnotatedElement.
getAnnotation(TableGeneratorAnnotation.ANNOTATION_NAME);
}
@@ -193,7 +193,7 @@ public class GenericJavaGeneratorContainer extends AbstractJavaJpaContextNode
}
protected SequenceGeneratorAnnotation getResourceSequenceGenerator() {
- return (SequenceGeneratorAnnotation) this.javaResourcePersistentMember.
+ return (SequenceGeneratorAnnotation) this.javaResourceAnnotatedElement.
getAnnotation(SequenceGeneratorAnnotation.ANNOTATION_NAME);
}
@@ -264,7 +264,7 @@ public class GenericJavaGeneratorContainer extends AbstractJavaJpaContextNode
}
public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.javaResourcePersistentMember.getTextRange(astRoot);
+ return this.javaResourceAnnotatedElement.getTextRange(astRoot);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaQueryContainer.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaQueryContainer.java
index 3baaedc7bc..df6ef5d53e 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaQueryContainer.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/java/GenericJavaQueryContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -25,7 +25,7 @@ import org.eclipse.jpt.core.context.java.JavaQueryContainer;
import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
import org.eclipse.jpt.core.internal.validation.DefaultJpaValidationMessages;
import org.eclipse.jpt.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.NamedNativeQueriesAnnotation;
import org.eclipse.jpt.core.resource.java.NamedNativeQueryAnnotation;
import org.eclipse.jpt.core.resource.java.NamedQueriesAnnotation;
@@ -41,7 +41,7 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
public class GenericJavaQueryContainer extends AbstractJavaJpaContextNode
implements JavaQueryContainer
{
- protected JavaResourcePersistentMember javaResourcePersistentMember;
+ protected JavaResourceAnnotatedElement javaResourceAnnotatedElement;
protected final List<JavaNamedQuery> namedQueries;
@@ -71,7 +71,7 @@ public class GenericJavaQueryContainer extends AbstractJavaJpaContextNode
JavaNamedQuery namedQuery = getJpaFactory().buildJavaNamedQuery(this);
this.namedQueries.add(index, namedQuery);
NamedQueryAnnotation namedQueryAnnotation =
- (NamedQueryAnnotation) this.javaResourcePersistentMember.
+ (NamedQueryAnnotation) this.javaResourceAnnotatedElement.
addAnnotation(
index, NamedQueryAnnotation.ANNOTATION_NAME,
NamedQueriesAnnotation.ANNOTATION_NAME);
@@ -94,7 +94,7 @@ public class GenericJavaQueryContainer extends AbstractJavaJpaContextNode
public void removeNamedQuery(int index) {
JavaNamedQuery removedNamedQuery = this.namedQueries.remove(index);
- this.javaResourcePersistentMember.removeAnnotation(
+ this.javaResourceAnnotatedElement.removeAnnotation(
index, NamedQueryAnnotation.ANNOTATION_NAME, NamedQueriesAnnotation.ANNOTATION_NAME);
fireItemRemoved(NAMED_QUERIES_LIST, index, removedNamedQuery);
}
@@ -105,7 +105,7 @@ public class GenericJavaQueryContainer extends AbstractJavaJpaContextNode
public void moveNamedQuery(int targetIndex, int sourceIndex) {
CollectionTools.move(this.namedQueries, targetIndex, sourceIndex);
- this.javaResourcePersistentMember.moveAnnotation(
+ this.javaResourceAnnotatedElement.moveAnnotation(
targetIndex, sourceIndex, NamedQueriesAnnotation.ANNOTATION_NAME);
fireItemMoved(NAMED_QUERIES_LIST, targetIndex, sourceIndex);
}
@@ -122,7 +122,7 @@ public class GenericJavaQueryContainer extends AbstractJavaJpaContextNode
JavaNamedNativeQuery namedNativeQuery = getJpaFactory().buildJavaNamedNativeQuery(this);
this.namedNativeQueries.add(index, namedNativeQuery);
NamedNativeQueryAnnotation namedNativeQueryAnnotation =
- (NamedNativeQueryAnnotation) this.javaResourcePersistentMember.
+ (NamedNativeQueryAnnotation) this.javaResourceAnnotatedElement.
addAnnotation(
index, NamedNativeQueryAnnotation.ANNOTATION_NAME,
NamedNativeQueriesAnnotation.ANNOTATION_NAME);
@@ -145,7 +145,7 @@ public class GenericJavaQueryContainer extends AbstractJavaJpaContextNode
public void removeNamedNativeQuery(int index) {
JavaNamedNativeQuery removedNamedNativeQuery = this.namedNativeQueries.remove(index);
- this.javaResourcePersistentMember.removeAnnotation(
+ this.javaResourceAnnotatedElement.removeAnnotation(
index, NamedNativeQueryAnnotation.ANNOTATION_NAME,
NamedNativeQueriesAnnotation.ANNOTATION_NAME);
fireItemRemoved(NAMED_NATIVE_QUERIES_LIST, index, removedNamedNativeQuery);
@@ -157,21 +157,21 @@ public class GenericJavaQueryContainer extends AbstractJavaJpaContextNode
public void moveNamedNativeQuery(int targetIndex, int sourceIndex) {
CollectionTools.move(this.namedNativeQueries, targetIndex, sourceIndex);
- this.javaResourcePersistentMember.moveAnnotation(
+ this.javaResourceAnnotatedElement.moveAnnotation(
targetIndex, sourceIndex, NamedNativeQueriesAnnotation.ANNOTATION_NAME);
fireItemMoved(NAMED_NATIVE_QUERIES_LIST, targetIndex, sourceIndex);
}
- public void initialize(JavaResourcePersistentMember jrpm) {
- this.javaResourcePersistentMember = jrpm;
+ public void initialize(JavaResourceAnnotatedElement jrae) {
+ this.javaResourceAnnotatedElement = jrae;
this.initializeNamedQueries();
this.initializeNamedNativeQueries();
}
protected void initializeNamedQueries() {
- for (Iterator<NestableAnnotation> stream = this.javaResourcePersistentMember.
+ for (Iterator<NestableAnnotation> stream = this.javaResourceAnnotatedElement.
annotations(
NamedQueryAnnotation.ANNOTATION_NAME,
NamedQueriesAnnotation.ANNOTATION_NAME);
@@ -181,7 +181,7 @@ public class GenericJavaQueryContainer extends AbstractJavaJpaContextNode
}
protected void initializeNamedNativeQueries() {
- for (Iterator<NestableAnnotation> stream = this.javaResourcePersistentMember.
+ for (Iterator<NestableAnnotation> stream = this.javaResourceAnnotatedElement.
annotations(
NamedNativeQueryAnnotation.ANNOTATION_NAME,
NamedNativeQueriesAnnotation.ANNOTATION_NAME);
@@ -202,8 +202,8 @@ public class GenericJavaQueryContainer extends AbstractJavaJpaContextNode
return namedNativeQuery;
}
- public void update(JavaResourcePersistentMember jrpm) {
- this.javaResourcePersistentMember = jrpm;
+ public void update(JavaResourceAnnotatedElement jrae) {
+ this.javaResourceAnnotatedElement = jrae;
this.updateNamedQueries();
this.updateNamedNativeQueries();
}
@@ -211,7 +211,7 @@ public class GenericJavaQueryContainer extends AbstractJavaJpaContextNode
protected void updateNamedQueries() {
ListIterator<JavaNamedQuery> queries = namedQueries();
Iterator<NestableAnnotation> resourceNamedQueries =
- this.javaResourcePersistentMember.annotations(
+ this.javaResourceAnnotatedElement.annotations(
NamedQueryAnnotation.ANNOTATION_NAME,
NamedQueriesAnnotation.ANNOTATION_NAME);
@@ -233,7 +233,7 @@ public class GenericJavaQueryContainer extends AbstractJavaJpaContextNode
protected void updateNamedNativeQueries() {
ListIterator<JavaNamedNativeQuery> queries = namedNativeQueries();
Iterator<NestableAnnotation> resourceNamedNativeQueries =
- this.javaResourcePersistentMember.annotations(
+ this.javaResourceAnnotatedElement.annotations(
NamedNativeQueryAnnotation.ANNOTATION_NAME,
NamedNativeQueriesAnnotation.ANNOTATION_NAME);
@@ -287,7 +287,7 @@ public class GenericJavaQueryContainer extends AbstractJavaJpaContextNode
}
public TextRange getValidationTextRange(CompilationUnit astRoot) {
- return this.javaResourcePersistentMember.getTextRange(astRoot);
+ return this.javaResourceAnnotatedElement.getTextRange(astRoot);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverride1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverride1_0Annotation.java
index 617747551f..edb94b6fcf 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverride1_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverride1_0Annotation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -10,8 +10,8 @@
package org.eclipse.jpt.core.internal.jpa1.resource.java.source;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAssociationOverrideAnnotation;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.JPA;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
@@ -37,12 +37,12 @@ public final class SourceAssociationOverride1_0Annotation
// ********** static methods **********
public static SourceAssociationOverride1_0Annotation buildAssociationOverride(JavaResourceNode parent, Member member) {
- return new SourceAssociationOverride1_0Annotation(parent, member, DECLARATION_ANNOTATION_ADAPTER, new MemberAnnotationAdapter(member, DECLARATION_ANNOTATION_ADAPTER));
+ return new SourceAssociationOverride1_0Annotation(parent, member, DECLARATION_ANNOTATION_ADAPTER, new ElementAnnotationAdapter(member, DECLARATION_ANNOTATION_ADAPTER));
}
static SourceAssociationOverride1_0Annotation buildNestedAssociationOverride(JavaResourceNode parent, Member member, int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, attributeOverridesAdapter);
- IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
+ IndexedAnnotationAdapter annotationAdapter = new ElementIndexedAnnotationAdapter(member, idaa);
return new SourceAssociationOverride1_0Annotation(parent, member, idaa, annotationAdapter);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverrides1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverrides1_0Annotation.java
index 44bf07b668..9d0ac2c39d 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverrides1_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/resource/java/source/SourceAssociationOverrides1_0Annotation.java
@@ -27,7 +27,7 @@ public final class SourceAssociationOverrides1_0Annotation
@Override
protected NestableAssociationOverrideAnnotation buildAssociationOverride(int index) {
- return SourceAssociationOverride1_0Annotation.buildNestedAssociationOverride(this, this.member, index, this.daa);
+ return SourceAssociationOverride1_0Annotation.buildNestedAssociationOverride(this, this.annotatedElement, index, this.daa);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Access2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Access2_0AnnotationDefinition.java
index ec2cd71009..882463673b 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Access2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Access2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,7 +15,9 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceAccess2_0An
import org.eclipse.jpt.core.jpa2.resource.java.Access2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,16 +43,16 @@ public final class Access2_0AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceAccess2_0Annotation(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceAccess2_0Annotation((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
- return new NullAccess2_0Annotation(parent);
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
+ return new NullAccess2_0Annotation((JavaResourcePersistentMember) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
- return new BinaryAccess2_0Annotation(parent, jdtAnnotation);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
+ return new BinaryAccess2_0Annotation((JavaResourcePersistentMember) parent, jdtAnnotation);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverride2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverride2_0AnnotationDefinition.java
index d885db7ebf..db340bd03f 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverride2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverride2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,7 +15,9 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceAssociation
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class AssociationOverride2_0AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return SourceAssociationOverride2_0Annotation.buildAssociationOverride(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return SourceAssociationOverride2_0Annotation.buildAssociationOverride((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryAssociationOverride2_0Annotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverrides2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverrides2_0AnnotationDefinition.java
index 3d9b6239d1..7a1b956899 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverrides2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/AssociationOverrides2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,7 +15,9 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceAssociation
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.AssociationOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class AssociationOverrides2_0AnnotationDefinition
super();
}
- public AssociationOverridesAnnotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceAssociationOverrides2_0Annotation(parent, member);
+ public AssociationOverridesAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceAssociationOverrides2_0Annotation((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public AssociationOverridesAnnotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public AssociationOverridesAnnotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryAssociationOverrides2_0Annotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Cacheable2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Cacheable2_0AnnotationDefinition.java
index e5911e193b..449589b721 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Cacheable2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/Cacheable2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,9 +15,9 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceCacheable2_
import org.eclipse.jpt.core.jpa2.resource.java.Cacheable2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -43,15 +43,15 @@ public final class Cacheable2_0AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceCacheable2_0Annotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceCacheable2_0Annotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryCacheable2_0Annotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/CollectionTable2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/CollectionTable2_0AnnotationDefinition.java
index 83740dbc57..add7b0eb7b 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/CollectionTable2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/CollectionTable2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,10 +15,10 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceCollectionT
import org.eclipse.jpt.core.jpa2.resource.java.CollectionTable2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.CollectionTable
@@ -43,15 +43,15 @@ public final class CollectionTable2_0AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceCollectionTable2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceCollectionTable2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullCollectionTable2_0Annotation(parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryCollectionTable2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/ElementCollection2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/ElementCollection2_0AnnotationDefinition.java
index 867ffbf4bb..d2ed5be3dd 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/ElementCollection2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/ElementCollection2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,10 +15,10 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceElementColl
import org.eclipse.jpt.core.jpa2.resource.java.ElementCollection2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.ElementCollection
@@ -43,15 +43,15 @@ public final class ElementCollection2_0AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceElementCollection2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceElementCollection2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryElementCollection2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/GeneratedAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/GeneratedAnnotationDefinition.java
index 42a60a11a5..3d8941b6bc 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/GeneratedAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/GeneratedAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,9 +14,9 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryGeneratedAn
import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceGeneratedAnnotation;
import org.eclipse.jpt.core.jpa2.resource.java.GeneratedAnnotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -45,15 +45,15 @@ public final class GeneratedAnnotationDefinition
super();
}
- public GeneratedAnnotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceGeneratedAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public GeneratedAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceGeneratedAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public GeneratedAnnotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public GeneratedAnnotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return null;
}
- public GeneratedAnnotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public GeneratedAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryGeneratedAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyClass2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyClass2_0AnnotationDefinition.java
index 0d2aa5b318..5c7042aebf 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyClass2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyClass2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,10 +15,10 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceMapKeyClass
import org.eclipse.jpt.core.jpa2.resource.java.MapKeyClass2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.MapKeyClass
@@ -43,15 +43,15 @@ public final class MapKeyClass2_0AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceMapKeyClass2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceMapKeyClass2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryMapKeyClass2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyColumn2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyColumn2_0AnnotationDefinition.java
index 92e276eb68..1ef128e751 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyColumn2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyColumn2_0AnnotationDefinition.java
@@ -15,10 +15,10 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceMapKeyColum
import org.eclipse.jpt.core.jpa2.resource.java.MapKeyColumn2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.MapKeyColumn
@@ -43,15 +43,15 @@ public final class MapKeyColumn2_0AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceMapKeyColumn2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceMapKeyColumn2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullMapKeyColumnAnnotation(parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryMapKeyColumn2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyEnumerated2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyEnumerated2_0AnnotationDefinition.java
index db6c09c0ca..602e923870 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyEnumerated2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyEnumerated2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,10 +15,10 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceMapKeyEnume
import org.eclipse.jpt.core.jpa2.resource.java.MapKeyEnumerated2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.MapKeyTemporal
@@ -43,15 +43,15 @@ public final class MapKeyEnumerated2_0AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceMapKeyEnumerated2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceMapKeyEnumerated2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullMapKeyEnumerated2_0Annotation((JavaResourcePersistentAttribute) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryMapKeyEnumerated2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumn2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumn2_0AnnotationDefinition.java
index f4e77d272a..a63a6fde6a 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumn2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumn2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,9 +14,9 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryMapKeyJoinC
import org.eclipse.jpt.core.jpa2.resource.java.MapKeyJoinColumn2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.MapKeyJoinColumn
@@ -41,15 +41,15 @@ public final class MapKeyJoinColumn2_0AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return SourceMapKeyJoinColumn2_0Annotation.createMapKeyJoinColumn(parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return SourceMapKeyJoinColumn2_0Annotation.createMapKeyJoinColumn(parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryMapKeyJoinColumn2_0Annotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumns2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumns2_0AnnotationDefinition.java
index 5054f2349c..2369738b96 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumns2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyJoinColumns2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,10 +14,10 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryMapKeyJoinC
import org.eclipse.jpt.core.jpa2.resource.java.MapKeyJoinColumns2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.MapKeyJoinColumns
@@ -42,15 +42,15 @@ public final class MapKeyJoinColumns2_0AnnotationDefinition
super();
}
- public MapKeyJoinColumns2_0Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceMapKeyJoinColumns2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public MapKeyJoinColumns2_0Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceMapKeyJoinColumns2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public MapKeyJoinColumns2_0Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public MapKeyJoinColumns2_0Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryMapKeyJoinColumns2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyTemporal2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyTemporal2_0AnnotationDefinition.java
index 86ada7cf70..dc20f1b06b 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyTemporal2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapKeyTemporal2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,10 +15,10 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceMapKeyTempo
import org.eclipse.jpt.core.jpa2.resource.java.MapKeyTemporal2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.MapKeyTemporal
@@ -43,15 +43,15 @@ public final class MapKeyTemporal2_0AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceMapKeyTemporal2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceMapKeyTemporal2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullMapKeyTemporal2_0Annotation((JavaResourcePersistentAttribute) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryMapKeyTemporal2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapsId2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapsId2_0AnnotationDefinition.java
index b8fb43cd26..c95e94cb49 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapsId2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/MapsId2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle.
+ * Copyright (c) 2009, 2010 Oracle.
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
@@ -16,10 +16,11 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceMapsId2_0An
import org.eclipse.jpt.core.jpa2.resource.java.MapsId2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.MapsId
@@ -46,15 +47,15 @@ public class MapsId2_0AnnotationDefinition implements AnnotationDefinition
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceMapsId2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceMapsId2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
- return new NullMapsId2_0Annotation(parent);
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
+ return new NullMapsId2_0Annotation((JavaResourcePersistentMember) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryMapsId2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQueries2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQueries2_0AnnotationDefinition.java
index 2c17accad0..fe9fe210fc 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQueries2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQueries2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
-* Copyright (c) 2009 Oracle. All rights reserved.
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,9 +14,9 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryNamedQuerie
import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceNamedQueries2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.NamedQueriesAnnotation;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -42,15 +42,15 @@ public class NamedQueries2_0AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceNamedQueries2_0Annotation(parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceNamedQueries2_0Annotation(parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryNamedQueries2_0Annotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQuery2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQuery2_0AnnotationDefinition.java
index 5c09d18be5..d5eee3db23 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQuery2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/NamedQuery2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
-* Copyright (c) 2009 Oracle. All rights reserved.
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,9 +14,9 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryNamedQuery2
import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceNamedQuery2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -42,15 +42,15 @@ public class NamedQuery2_0AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceNamedQuery2_0Annotation(parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceNamedQuery2_0Annotation(parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryNamedQuery2_0Annotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/OrderColumn2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/OrderColumn2_0AnnotationDefinition.java
index 114a3a704e..beb31d43e3 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/OrderColumn2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/OrderColumn2_0AnnotationDefinition.java
@@ -15,10 +15,10 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceOrderColumn
import org.eclipse.jpt.core.jpa2.resource.java.OrderColumn2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.OrderColumn
@@ -43,15 +43,15 @@ public final class OrderColumn2_0AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceOrderColumn2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceOrderColumn2_0Annotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullOrderColumn2_0Annotation((JavaResourcePersistentAttribute) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryOrderColumn2_0Annotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SequenceGenerator2_0AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SequenceGenerator2_0AnnotationDefinition.java
index f3d9aed822..b93573029c 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SequenceGenerator2_0AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SequenceGenerator2_0AnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
-* Copyright (c) 2009 Oracle. All rights reserved.
+* Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,8 +14,10 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinarySequenceGen
import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceSequenceGenerator2_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.SequenceGeneratorAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class SequenceGenerator2_0AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceSequenceGenerator2_0Annotation(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceSequenceGenerator2_0Annotation((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinarySequenceGenerator2_0Annotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumn2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumn2_0Annotation.java
index 7d5aa069a1..1dea4addd4 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumn2_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumn2_0Annotation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -10,8 +10,8 @@
package org.eclipse.jpt.core.internal.jpa2.resource.java;
import org.eclipse.jpt.core.internal.resource.java.source.SourceBaseJoinColumnAnnotation;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
@@ -38,11 +38,11 @@ public final class SourceMapKeyJoinColumn2_0Annotation
}
public SourceMapKeyJoinColumn2_0Annotation(JavaResourceNode parent, Attribute attribute, DeclarationAnnotationAdapter daa) {
- this(parent, attribute, daa, new MemberAnnotationAdapter(attribute, daa));
+ this(parent, attribute, daa, new ElementAnnotationAdapter(attribute, daa));
}
public SourceMapKeyJoinColumn2_0Annotation(JavaResourceNode parent, Attribute attribute, IndexedDeclarationAnnotationAdapter idaa) {
- this(parent, attribute, idaa, new MemberIndexedAnnotationAdapter(attribute, idaa));
+ this(parent, attribute, idaa, new ElementIndexedAnnotationAdapter(attribute, idaa));
}
public String getAnnotationName() {
@@ -106,7 +106,7 @@ public final class SourceMapKeyJoinColumn2_0Annotation
static SourceMapKeyJoinColumn2_0Annotation createNestedMapKeyJoinColumn(JavaResourceNode parent, Attribute attribute, int index, DeclarationAnnotationAdapter joinColumnsAdapter) {
IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, joinColumnsAdapter);
- IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(attribute, idaa);
+ IndexedAnnotationAdapter annotationAdapter = new ElementIndexedAnnotationAdapter(attribute, idaa);
return new SourceMapKeyJoinColumn2_0Annotation(parent, attribute, idaa, annotationAdapter);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumns2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumns2_0Annotation.java
index 68ca7dafc9..8969766c8d 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumns2_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/SourceMapKeyJoinColumns2_0Annotation.java
@@ -21,7 +21,6 @@ import org.eclipse.jpt.core.jpa2.resource.java.MapKeyJoinColumn2_0Annotation;
import org.eclipse.jpt.core.jpa2.resource.java.MapKeyJoinColumns2_0Annotation;
import org.eclipse.jpt.core.jpa2.resource.java.NestableMapKeyJoinColumnAnnotation;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.NestableJoinColumnAnnotation;
import org.eclipse.jpt.core.utility.jdt.Attribute;
import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
import org.eclipse.jpt.utility.internal.CollectionTools;
@@ -97,7 +96,7 @@ public final class SourceMapKeyJoinColumns2_0Annotation
}
private NestableMapKeyJoinColumnAnnotation buildMapKeyJoinColumn(int index) {
- return SourceMapKeyJoinColumn2_0Annotation.createNestedMapKeyJoinColumn(this, this.member, index, this.daa);
+ return SourceMapKeyJoinColumn2_0Annotation.createNestedMapKeyJoinColumn(this, this.annotatedElement, index, this.daa);
}
public NestableMapKeyJoinColumnAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/StaticMetamodelAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/StaticMetamodelAnnotationDefinition.java
index 76686e5815..676036658f 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/StaticMetamodelAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/StaticMetamodelAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,9 +14,9 @@ import org.eclipse.jpt.core.internal.jpa2.resource.java.binary.BinaryStaticMetam
import org.eclipse.jpt.core.internal.jpa2.resource.java.source.SourceStaticMetamodelAnnotation;
import org.eclipse.jpt.core.jpa2.resource.java.StaticMetamodelAnnotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -45,15 +45,15 @@ public final class StaticMetamodelAnnotationDefinition
super();
}
- public StaticMetamodelAnnotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceStaticMetamodelAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public StaticMetamodelAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceStaticMetamodelAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public StaticMetamodelAnnotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public StaticMetamodelAnnotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return null;
}
- public StaticMetamodelAnnotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public StaticMetamodelAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryStaticMetamodelAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAccess2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAccess2_0Annotation.java
index 0fa89552f4..8bcf5f4221 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAccess2_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAccess2_0Annotation.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.jpa2.resource.java.Access2_0Annotation;
import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
@@ -40,7 +40,7 @@ public final class SourceAccess2_0Annotation
public SourceAccess2_0Annotation(JavaResourcePersistentMember parent, Member member) {
super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(member, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(member, VALUE_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverride2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverride2_0Annotation.java
index e006d46218..ac2436b769 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverride2_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverride2_0Annotation.java
@@ -13,8 +13,8 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.jpa2.resource.java.NullAssociationOverrideJoinTableAnnotation;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAssociationOverrideAnnotation;
import org.eclipse.jpt.core.internal.resource.java.source.SourceJoinTableAnnotation;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.jpa2.resource.java.AssociationOverride2_0Annotation;
@@ -35,21 +35,21 @@ public final class SourceAssociationOverride2_0Annotation
extends SourceAssociationOverrideAnnotation
implements AssociationOverride2_0Annotation
{
- private final MemberAnnotationAdapter joinTableAdapter;
+ private final ElementAnnotationAdapter joinTableAdapter;
private NestableJoinTableAnnotation joinTable;
// ********** constructor **********
public SourceAssociationOverride2_0Annotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
super(parent, member, daa, annotationAdapter);
- this.joinTableAdapter = new MemberAnnotationAdapter(this.member, buildJoinTableAnnotationAdapter(this.daa));
+ this.joinTableAdapter = new ElementAnnotationAdapter(this.annotatedElement, buildJoinTableAnnotationAdapter(this.daa));
}
@Override
public void initialize(CompilationUnit astRoot) {
super.initialize(astRoot);
if (this.joinTableAdapter.getAnnotation(astRoot) != null) {
- this.joinTable = buildJoinTableAnnotation(this, this.member, this.daa);
+ this.joinTable = buildJoinTableAnnotation(this, this.annotatedElement, this.daa);
this.joinTable.initialize(astRoot);
}
}
@@ -75,7 +75,7 @@ public final class SourceAssociationOverride2_0Annotation
if (this.joinTable != null) {
throw new IllegalStateException("'joinTable' element already exists: " + this.joinTable); //$NON-NLS-1$
}
- this.joinTable = buildJoinTableAnnotation(this, this.member, this.daa);
+ this.joinTable = buildJoinTableAnnotation(this, this.annotatedElement, this.daa);
this.joinTable.newAnnotation();
return this.joinTable;
}
@@ -93,7 +93,7 @@ public final class SourceAssociationOverride2_0Annotation
this.syncJoinTable_(null);
} else {
if (this.joinTable == null) {
- NestableJoinTableAnnotation table = buildJoinTableAnnotation(this, this.member, this.daa);
+ NestableJoinTableAnnotation table = buildJoinTableAnnotation(this, this.annotatedElement, this.daa);
table.initialize(astRoot);
this.syncJoinTable_(table);
} else {
@@ -112,7 +112,7 @@ public final class SourceAssociationOverride2_0Annotation
// ********** static methods **********
public static SourceAssociationOverride2_0Annotation buildAssociationOverride(JavaResourceNode parent, Member member) {
- return new SourceAssociationOverride2_0Annotation(parent, member, DECLARATION_ANNOTATION_ADAPTER, new MemberAnnotationAdapter(member, DECLARATION_ANNOTATION_ADAPTER));
+ return new SourceAssociationOverride2_0Annotation(parent, member, DECLARATION_ANNOTATION_ADAPTER, new ElementAnnotationAdapter(member, DECLARATION_ANNOTATION_ADAPTER));
}
static NestableJoinTableAnnotation buildJoinTableAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter associationOverrideAnnotationAdapter) {
@@ -126,7 +126,7 @@ public final class SourceAssociationOverride2_0Annotation
static SourceAssociationOverrideAnnotation buildNestedAssociationOverride(JavaResourceNode parent, Member member, int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, attributeOverridesAdapter);
- IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
+ IndexedAnnotationAdapter annotationAdapter = new ElementIndexedAnnotationAdapter(member, idaa);
return new SourceAssociationOverride2_0Annotation(parent, member, idaa, annotationAdapter);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverrides2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverrides2_0Annotation.java
index 9a72dd220e..65654ebbbb 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverrides2_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceAssociationOverrides2_0Annotation.java
@@ -27,7 +27,7 @@ public final class SourceAssociationOverrides2_0Annotation
@Override
protected NestableAssociationOverrideAnnotation buildAssociationOverride(int index) {
- return SourceAssociationOverride2_0Annotation.buildNestedAssociationOverride(this, this.member, index, this.daa);
+ return SourceAssociationOverride2_0Annotation.buildNestedAssociationOverride(this, this.annotatedElement, index, this.daa);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCacheable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCacheable2_0Annotation.java
index 85fd521da8..7879971781 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCacheable2_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCacheable2_0Annotation.java
@@ -13,7 +13,7 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.BooleanExpressionConverter;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.jpa2.resource.java.Cacheable2_0Annotation;
import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
@@ -41,7 +41,7 @@ public final class SourceCacheable2_0Annotation
public SourceCacheable2_0Annotation(JavaResourcePersistentType parent, Type type) {
super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<Boolean>(type, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<Boolean>(type, VALUE_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCollectionTable2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCollectionTable2_0Annotation.java
index 8591d533b1..c25acb66ff 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCollectionTable2_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceCollectionTable2_0Annotation.java
@@ -147,7 +147,7 @@ public final class SourceCollectionTable2_0Annotation
}
private NestableJoinColumnAnnotation buildJoinColumn(int index) {
- return new SourceJoinColumnAnnotation(this, this.member, buildJoinColumnAnnotationAdapter(index));
+ return new SourceJoinColumnAnnotation(this, this.annotatedElement, buildJoinColumnAnnotationAdapter(index));
}
private IndexedDeclarationAnnotationAdapter buildJoinColumnAnnotationAdapter(int index) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceElementCollection2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceElementCollection2_0Annotation.java
index 9c2cbbc509..5aadf6afd1 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceElementCollection2_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceElementCollection2_0Annotation.java
@@ -14,7 +14,7 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
import org.eclipse.jpt.core.jpa2.resource.java.ElementCollection2_0Annotation;
@@ -50,8 +50,8 @@ public final class SourceElementCollection2_0Annotation
public SourceElementCollection2_0Annotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
- this.targetClassAdapter = new MemberAnnotationElementAdapter<String>(attribute, TARGET_CLASS_ADAPTER);
- this.fetchAdapter = new MemberAnnotationElementAdapter<String>(attribute, FETCH_ADAPTER);
+ this.targetClassAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, TARGET_CLASS_ADAPTER);
+ this.fetchAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, FETCH_ADAPTER);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceGeneratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceGeneratedAnnotation.java
index fa8da6ec08..fe05d57de2 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceGeneratedAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceGeneratedAnnotation.java
@@ -17,7 +17,7 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.AnnotationStringArrayExpressionConverter;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.jpa2.resource.java.GeneratedAnnotation;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
@@ -64,11 +64,11 @@ public final class SourceGeneratedAnnotation
}
private AnnotationElementAdapter<String[]> buildAnnotationElementAdapter(DeclarationAnnotationElementAdapter<String[]> daea) {
- return new MemberAnnotationElementAdapter<String[]>(this.member, daea);
+ return new AnnotatedElementAnnotationElementAdapter<String[]>(this.annotatedElement, daea);
}
private AnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new MemberAnnotationElementAdapter<String>(this.member, daea);
+ return new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, daea);
}
public void initialize(CompilationUnit astRoot) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyClass2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyClass2_0Annotation.java
index 27177fdb01..38d0b29b66 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyClass2_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapKeyClass2_0Annotation.java
@@ -13,7 +13,7 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
@@ -43,7 +43,7 @@ public final class SourceMapKeyClass2_0Annotation
public SourceMapKeyClass2_0Annotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(attribute, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, VALUE_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapsId2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapsId2_0Annotation.java
index 4331c36a1d..fe3fa6e609 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapsId2_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceMapsId2_0Annotation.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
import org.eclipse.jpt.core.jpa2.resource.java.MapsId2_0Annotation;
@@ -42,7 +42,7 @@ public final class SourceMapsId2_0Annotation
public SourceMapsId2_0Annotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(attribute, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, VALUE_ADAPTER);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQueries2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQueries2_0Annotation.java
index 1e86f39717..1e06d80008 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQueries2_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQueries2_0Annotation.java
@@ -26,6 +26,6 @@ public final class SourceNamedQueries2_0Annotation
@Override
protected NestableNamedQueryAnnotation buildNamedQuery(int index) {
- return SourceNamedQuery2_0Annotation.createNestedNamedQuery(this, member, index, this.daa);
+ return SourceNamedQuery2_0Annotation.createNestedNamedQuery(this, this.annotatedElement, index, this.daa);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQuery2_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQuery2_0Annotation.java
index abc4264e2c..2d9a9e9130 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQuery2_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceNamedQuery2_0Annotation.java
@@ -12,9 +12,9 @@ package org.eclipse.jpt.core.internal.jpa2.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceNamedQueryAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
import org.eclipse.jpt.core.jpa2.resource.java.LockModeType_2_0;
@@ -46,11 +46,11 @@ public final class SourceNamedQuery2_0Annotation
public SourceNamedQuery2_0Annotation(JavaResourceNode parent, Type type, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
super(parent, type, daa, annotationAdapter);
this.lockModeDeclarationAdapter = this.buildLockModeTypeAdapter(daa);
- this.lockModeAdapter = new MemberAnnotationElementAdapter<String>(type, this.lockModeDeclarationAdapter);
+ this.lockModeAdapter = new AnnotatedElementAnnotationElementAdapter<String>(type, this.lockModeDeclarationAdapter);
}
public SourceNamedQuery2_0Annotation(JavaResourceNode parent, Type type) {
- this(parent, type, DECLARATION_ANNOTATION_ADAPTER, new MemberAnnotationAdapter(type, DECLARATION_ANNOTATION_ADAPTER));
+ this(parent, type, DECLARATION_ANNOTATION_ADAPTER, new ElementAnnotationAdapter(type, DECLARATION_ANNOTATION_ADAPTER));
}
private DeclarationAnnotationElementAdapter<String> buildLockModeTypeAdapter(DeclarationAnnotationAdapter daAdapter) {
@@ -123,7 +123,7 @@ public final class SourceNamedQuery2_0Annotation
static SourceNamedQuery2_0Annotation createNestedNamedQuery(JavaResourceNode parent, Type type, int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, attributeOverridesAdapter);
- IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(type, idaa);
+ IndexedAnnotationAdapter annotationAdapter = new ElementIndexedAnnotationAdapter(type, idaa);
return new SourceNamedQuery2_0Annotation(parent, type, idaa, annotationAdapter);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceStaticMetamodelAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceStaticMetamodelAnnotation.java
index 4a2ceea0ef..d7c4adb5e7 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceStaticMetamodelAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa2/resource/java/source/SourceStaticMetamodelAnnotation.java
@@ -13,7 +13,7 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
import org.eclipse.jpt.core.jpa2.resource.java.JPA2_0;
@@ -42,7 +42,7 @@ public final class SourceStaticMetamodelAnnotation
public SourceStaticMetamodelAnnotation(JavaResourcePersistentType parent, Type type) {
super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverrideAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverrideAnnotationDefinition.java
index 9fc26e3348..50711510e4 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverrideAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverrideAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,7 +15,9 @@ import org.eclipse.jpt.core.internal.jpa1.resource.java.source.SourceAssociation
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.AssociationOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class AssociationOverrideAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return SourceAssociationOverride1_0Annotation.buildAssociationOverride(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return SourceAssociationOverride1_0Annotation.buildAssociationOverride((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryAssociationOverride1_0Annotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverridesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverridesAnnotationDefinition.java
index 2fd18af99f..1c22e47f57 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverridesAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AssociationOverridesAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,7 +15,9 @@ import org.eclipse.jpt.core.internal.jpa1.resource.java.source.SourceAssociation
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.AssociationOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class AssociationOverridesAnnotationDefinition
super();
}
- public AssociationOverridesAnnotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceAssociationOverrides1_0Annotation(parent, member);
+ public AssociationOverridesAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceAssociationOverrides1_0Annotation((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public AssociationOverridesAnnotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public AssociationOverridesAnnotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryAssociationOverrides1_0Annotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverrideAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverrideAnnotationDefinition.java
index 03b83f682e..9cff112d36 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverrideAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverrideAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,7 +15,9 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceAttributeOverrid
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.AttributeOverrideAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class AttributeOverrideAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return SourceAttributeOverrideAnnotation.buildAttributeOverride(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return SourceAttributeOverrideAnnotation.buildAttributeOverride((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryAttributeOverrideAnnotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverridesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverridesAnnotationDefinition.java
index 27c8986fcb..4076edf941 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverridesAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/AttributeOverridesAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,7 +15,9 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceAttributeOverrid
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.AttributeOverridesAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class AttributeOverridesAnnotationDefinition
super();
}
- public AttributeOverridesAnnotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceAttributeOverridesAnnotation(parent, member);
+ public AttributeOverridesAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceAttributeOverridesAnnotation((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public AttributeOverridesAnnotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public AttributeOverridesAnnotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryAttributeOverridesAnnotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/BasicAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/BasicAnnotationDefinition.java
index 989aa71ed0..d42a2e93b2 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/BasicAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/BasicAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,10 +15,10 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceBasicAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.BasicAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.Basic
@@ -43,15 +43,15 @@ public final class BasicAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceBasicAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceBasicAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullBasicAnnotation((JavaResourcePersistentAttribute) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryBasicAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ColumnAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ColumnAnnotationDefinition.java
index 219c98745c..5de550cfff 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ColumnAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ColumnAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,7 +15,9 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceColumnAnnotation
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class ColumnAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceColumnAnnotation(parent, member, SourceColumnAnnotation.MAPPING_DECLARATION_ANNOTATION_ADAPTER);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceColumnAnnotation((JavaResourcePersistentMember) parent, (Member) annotatedElement, SourceColumnAnnotation.MAPPING_DECLARATION_ANNOTATION_ADAPTER);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullColumnAnnotation(parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryColumnAnnotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorColumnAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorColumnAnnotationDefinition.java
index 503bc038d3..9aa2710a3a 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorColumnAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorColumnAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,9 +15,9 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceDiscriminatorCol
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.DiscriminatorColumnAnnotation;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -44,15 +44,15 @@ public final class DiscriminatorColumnAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceDiscriminatorColumnAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceDiscriminatorColumnAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullDiscriminatorColumnAnnotation((JavaResourcePersistentType) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryDiscriminatorColumnAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorValueAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorValueAnnotationDefinition.java
index 449ccdadc4..3bf48b53a5 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorValueAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/DiscriminatorValueAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,9 +15,9 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceDiscriminatorVal
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.DiscriminatorValueAnnotation;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -43,15 +43,15 @@ public final class DiscriminatorValueAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceDiscriminatorValueAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceDiscriminatorValueAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullDiscriminatorValueAnnotation((JavaResourcePersistentType) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryDiscriminatorValueAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddableAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddableAnnotationDefinition.java
index fd7dbfa3c7..d46f5fb42e 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddableAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddableAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,9 +15,9 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceEmbeddableAnnota
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.EmbeddableAnnotation;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -43,15 +43,15 @@ public final class EmbeddableAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEmbeddableAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEmbeddableAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEmbeddableAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedAnnotationDefinition.java
index 1a3889fe3c..1f8f1894bd 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,10 +15,10 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceEmbeddedAnnotati
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.EmbeddedAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.Embedded
@@ -43,15 +43,15 @@ public final class EmbeddedAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEmbeddedAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEmbeddedAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullEmbeddedAnnotation((JavaResourcePersistentAttribute) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEmbeddedAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedIdAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedIdAnnotationDefinition.java
index 741375240d..254060b91b 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedIdAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EmbeddedIdAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,10 +15,10 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceEmbeddedIdAnnota
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.EmbeddedIdAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.EmbeddedId
@@ -43,15 +43,15 @@ public final class EmbeddedIdAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEmbeddedIdAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEmbeddedIdAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEmbeddedIdAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EntityAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EntityAnnotationDefinition.java
index 7c4f432ffe..be9463071d 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EntityAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EntityAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,9 +15,9 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceEntityAnnotation
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.EntityAnnotation;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -43,15 +43,15 @@ public final class EntityAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEntityAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEntityAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEntityAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EnumeratedAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EnumeratedAnnotationDefinition.java
index f5e9c49e1a..a3ff9bee5c 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EnumeratedAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/EnumeratedAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,10 +15,10 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceEnumeratedAnnota
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.EnumeratedAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.Enumerated
@@ -43,15 +43,15 @@ public final class EnumeratedAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEnumeratedAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEnumeratedAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullEnumeratedAnnotation((JavaResourcePersistentAttribute) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEnumeratedAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/GeneratedValueAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/GeneratedValueAnnotationDefinition.java
index 0b537e4757..db490cd11a 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/GeneratedValueAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/GeneratedValueAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,10 +15,10 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceGeneratedValueAn
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.GeneratedValueAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.GeneratedValue
@@ -43,15 +43,15 @@ public final class GeneratedValueAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceGeneratedValueAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceGeneratedValueAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryGeneratedValueAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdAnnotationDefinition.java
index 12ebf03b98..24a22d40cb 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,10 +15,10 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceIdAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.IdAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.Id
@@ -43,15 +43,15 @@ public final class IdAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceIdAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceIdAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryIdAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdClassAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdClassAnnotationDefinition.java
index 1f7bec270c..5df915d4e9 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdClassAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/IdClassAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,9 +15,9 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceIdClassAnnotatio
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.IdClassAnnotation;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -43,15 +43,15 @@ public final class IdClassAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceIdClassAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceIdClassAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryIdClassAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/InheritanceAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/InheritanceAnnotationDefinition.java
index 297ae12fa7..d69eb2b90c 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/InheritanceAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/InheritanceAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -15,9 +15,9 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceInheritanceAnnot
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.core.resource.java.InheritanceAnnotation;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -43,15 +43,15 @@ public final class InheritanceAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceInheritanceAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceInheritanceAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullInheritanceAnnotation((JavaResourcePersistentType) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryInheritanceAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnAnnotationDefinition.java
index c2c248a86c..3886b290aa 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,8 +14,10 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryJoinColumnAnnota
import org.eclipse.jpt.core.internal.resource.java.source.SourceJoinColumnAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.JoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class JoinColumnAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return SourceJoinColumnAnnotation.createJoinColumn(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return SourceJoinColumnAnnotation.createJoinColumn((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryJoinColumnAnnotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnsAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnsAnnotationDefinition.java
index 1c00f40fde..a68ca888a6 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnsAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinColumnsAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,8 +14,10 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryJoinColumnsAnnot
import org.eclipse.jpt.core.internal.resource.java.source.SourceJoinColumnsAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.JoinColumnsAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class JoinColumnsAnnotationDefinition
super();
}
- public JoinColumnsAnnotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceJoinColumnsAnnotation(parent, member);
+ public JoinColumnsAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceJoinColumnsAnnotation((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public JoinColumnsAnnotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public JoinColumnsAnnotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryJoinColumnsAnnotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinTableAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinTableAnnotationDefinition.java
index a58445ec6a..fd30d5041a 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinTableAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/JoinTableAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,8 +14,10 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryJoinTableAnnotat
import org.eclipse.jpt.core.internal.resource.java.source.SourceJoinTableAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.JoinTableAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class JoinTableAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceJoinTableAnnotation(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceJoinTableAnnotation((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullJoinTableAnnotation(parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryJoinTableAnnotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/LobAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/LobAnnotationDefinition.java
index fc4536f6c3..241312d2c1 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/LobAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/LobAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,11 +14,11 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryLobAnnotation;
import org.eclipse.jpt.core.internal.resource.java.source.SourceLobAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.LobAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.Lob
@@ -43,15 +43,15 @@ public final class LobAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceLobAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceLobAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryLobAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToManyAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToManyAnnotationDefinition.java
index a10d93fec5..0fae712ccd 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToManyAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToManyAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,11 +14,11 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryManyToManyAnnota
import org.eclipse.jpt.core.internal.resource.java.source.SourceManyToManyAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.ManyToManyAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.ManyToMany
@@ -43,15 +43,15 @@ public final class ManyToManyAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceManyToManyAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceManyToManyAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryManyToManyAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToOneAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToOneAnnotationDefinition.java
index 140d7977b8..db3b4663fe 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToOneAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/ManyToOneAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,11 +14,11 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryManyToOneAnnotat
import org.eclipse.jpt.core.internal.resource.java.source.SourceManyToOneAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.ManyToOneAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.ManyToOne
@@ -43,15 +43,15 @@ public final class ManyToOneAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceManyToOneAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceManyToOneAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryManyToOneAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MapKeyAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MapKeyAnnotationDefinition.java
index a104c7036d..a6caec3309 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MapKeyAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MapKeyAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,11 +14,11 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryMapKeyAnnotation
import org.eclipse.jpt.core.internal.resource.java.source.SourceMapKeyAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.MapKeyAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.MapKey
@@ -43,15 +43,15 @@ public final class MapKeyAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceMapKeyAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceMapKeyAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryMapKeyAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MappedSuperclassAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MappedSuperclassAnnotationDefinition.java
index c6452c9e68..844ac6aaed 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MappedSuperclassAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/MappedSuperclassAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,10 +14,10 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryMappedSuperclass
import org.eclipse.jpt.core.internal.resource.java.source.SourceMappedSuperclassAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
import org.eclipse.jpt.core.resource.java.MappedSuperclassAnnotation;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -43,15 +43,15 @@ public final class MappedSuperclassAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceMappedSuperclassAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceMappedSuperclassAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryMappedSuperclassAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueriesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueriesAnnotationDefinition.java
index 21d55cb918..d503efdb6a 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueriesAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueriesAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,9 +14,9 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryNamedNativeQueri
import org.eclipse.jpt.core.internal.resource.java.source.SourceNamedNativeQueriesAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.NamedNativeQueriesAnnotation;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -42,15 +42,15 @@ public final class NamedNativeQueriesAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceNamedNativeQueriesAnnotation(parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceNamedNativeQueriesAnnotation(parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryNamedNativeQueriesAnnotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueryAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueryAnnotationDefinition.java
index db6d640c07..c8e63fc6a1 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueryAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedNativeQueryAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,9 +14,9 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryNamedNativeQuery
import org.eclipse.jpt.core.internal.resource.java.source.SourceNamedNativeQueryAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.NamedNativeQueryAnnotation;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -42,15 +42,15 @@ public final class NamedNativeQueryAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return SourceNamedNativeQueryAnnotation.createNamedNativeQuery(parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return SourceNamedNativeQueryAnnotation.createNamedNativeQuery(parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryNamedNativeQueryAnnotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueriesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueriesAnnotationDefinition.java
index ef71eec403..17b84bc2b3 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueriesAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueriesAnnotationDefinition.java
@@ -14,9 +14,9 @@ import org.eclipse.jpt.core.internal.jpa1.resource.java.binary.BinaryNamedQuerie
import org.eclipse.jpt.core.internal.resource.java.source.SourceNamedQueries1_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.NamedQueriesAnnotation;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -42,15 +42,15 @@ public final class NamedQueriesAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceNamedQueries1_0Annotation(parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceNamedQueries1_0Annotation(parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryNamedQueries1_0Annotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueryAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueryAnnotationDefinition.java
index 9685560628..0f16c9c625 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueryAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/NamedQueryAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,9 +14,9 @@ import org.eclipse.jpt.core.internal.jpa1.resource.java.binary.BinaryNamedQuery1
import org.eclipse.jpt.core.internal.jpa1.resource.java.source.SourceNamedQuery1_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.NamedQueryAnnotation;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -42,15 +42,15 @@ public final class NamedQueryAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceNamedQuery1_0Annotation(parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceNamedQuery1_0Annotation(parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryNamedQuery1_0Annotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToManyAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToManyAnnotationDefinition.java
index 0c9833eefd..f577b6c278 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToManyAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToManyAnnotationDefinition.java
@@ -14,11 +14,11 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryOneToManyAnnotat
import org.eclipse.jpt.core.internal.resource.java.source.SourceOneToManyAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.OneToManyAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.OneToMany
@@ -43,15 +43,15 @@ public final class OneToManyAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceOneToManyAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceOneToManyAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullOneToManyAnnotation((JavaResourcePersistentAttribute) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryOneToManyAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToOneAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToOneAnnotationDefinition.java
index 6b600ca1f1..64892f8892 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToOneAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OneToOneAnnotationDefinition.java
@@ -14,11 +14,11 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryOneToOneAnnotati
import org.eclipse.jpt.core.internal.resource.java.source.SourceOneToOneAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.OneToOneAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.OneToOne
@@ -43,15 +43,15 @@ public final class OneToOneAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceOneToOneAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceOneToOneAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullOneToOneAnnotation((JavaResourcePersistentAttribute) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryOneToOneAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OrderByAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OrderByAnnotationDefinition.java
index 59997519a7..46bc3accb4 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OrderByAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/OrderByAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,11 +14,11 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryOrderByAnnotatio
import org.eclipse.jpt.core.internal.resource.java.source.SourceOrderByAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.OrderByAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.OrderBy
@@ -43,15 +43,15 @@ public final class OrderByAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceOrderByAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceOrderByAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryOrderByAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnAnnotationDefinition.java
index 77499381c1..e2ecdc3bdb 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,8 +14,10 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryPrimaryKeyJoinCo
import org.eclipse.jpt.core.internal.resource.java.source.SourcePrimaryKeyJoinColumnAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class PrimaryKeyJoinColumnAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return SourcePrimaryKeyJoinColumnAnnotation.createPrimaryKeyJoinColumn(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return SourcePrimaryKeyJoinColumnAnnotation.createPrimaryKeyJoinColumn((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryPrimaryKeyJoinColumnAnnotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnsAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnsAnnotationDefinition.java
index 0c67aba310..a88725f801 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnsAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/PrimaryKeyJoinColumnsAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,8 +14,10 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryPrimaryKeyJoinCo
import org.eclipse.jpt.core.internal.resource.java.source.SourcePrimaryKeyJoinColumnsAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.PrimaryKeyJoinColumnsAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class PrimaryKeyJoinColumnsAnnotationDefinition
super();
}
- public PrimaryKeyJoinColumnsAnnotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourcePrimaryKeyJoinColumnsAnnotation(parent, member);
+ public PrimaryKeyJoinColumnsAnnotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourcePrimaryKeyJoinColumnsAnnotation((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public PrimaryKeyJoinColumnsAnnotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public PrimaryKeyJoinColumnsAnnotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryPrimaryKeyJoinColumnsAnnotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTableAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTableAnnotationDefinition.java
index cca983ff52..173c92027e 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTableAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTableAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,8 +14,10 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinarySecondaryTableAn
import org.eclipse.jpt.core.internal.resource.java.source.SourceSecondaryTableAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.SecondaryTableAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class SecondaryTableAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return SourceSecondaryTableAnnotation.createSecondaryTable(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return SourceSecondaryTableAnnotation.createSecondaryTable((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinarySecondaryTableAnnotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTablesAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTablesAnnotationDefinition.java
index 037c96894c..2fceff310b 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTablesAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SecondaryTablesAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,9 +14,10 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinarySecondaryTablesA
import org.eclipse.jpt.core.internal.resource.java.source.SourceSecondaryTablesAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
import org.eclipse.jpt.core.resource.java.SecondaryTablesAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -42,15 +43,15 @@ public final class SecondaryTablesAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceSecondaryTablesAnnotation((JavaResourcePersistentType) parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceSecondaryTablesAnnotation((JavaResourcePersistentType) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinarySecondaryTablesAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SequenceGeneratorAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SequenceGeneratorAnnotationDefinition.java
index 884b36bb1a..a2a549b431 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SequenceGeneratorAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/SequenceGeneratorAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,8 +14,10 @@ import org.eclipse.jpt.core.internal.jpa1.resource.java.binary.BinarySequenceGen
import org.eclipse.jpt.core.internal.jpa1.resource.java.source.SourceSequenceGenerator1_0Annotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.SequenceGeneratorAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class SequenceGeneratorAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceSequenceGenerator1_0Annotation(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceSequenceGenerator1_0Annotation((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinarySequenceGenerator1_0Annotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableAnnotationDefinition.java
index eb4880ad97..7c90087be1 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,10 +14,10 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryTableAnnotation;
import org.eclipse.jpt.core.internal.resource.java.source.SourceTableAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
import org.eclipse.jpt.core.resource.java.TableAnnotation;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
/**
@@ -43,15 +43,15 @@ public final class TableAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceTableAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceTableAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullTableAnnotation((JavaResourcePersistentType) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryTableAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableGeneratorAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableGeneratorAnnotationDefinition.java
index 428e818d4c..e272f037eb 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableGeneratorAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TableGeneratorAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,8 +14,10 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryTableGeneratorAn
import org.eclipse.jpt.core.internal.resource.java.source.SourceTableGeneratorAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.TableGeneratorAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
/**
@@ -41,15 +43,15 @@ public final class TableGeneratorAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceTableGeneratorAnnotation(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceTableGeneratorAnnotation((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryTableGeneratorAnnotation(parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TemporalAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TemporalAnnotationDefinition.java
index a1661263c9..ed951dc1d4 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TemporalAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TemporalAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,11 +14,11 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryTemporalAnnotati
import org.eclipse.jpt.core.internal.resource.java.source.SourceTemporalAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.TemporalAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.Temporal
@@ -43,15 +43,15 @@ public final class TemporalAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceTemporalAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceTemporalAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullTemporalAnnotation((JavaResourcePersistentAttribute) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryTemporalAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TransientAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TransientAnnotationDefinition.java
index 4d84704c0f..414a2c6ac3 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TransientAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/TransientAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,11 +14,11 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryTransientAnnotat
import org.eclipse.jpt.core.internal.resource.java.source.SourceTransientAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.TransientAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.Transient
@@ -43,15 +43,15 @@ public final class TransientAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceTransientAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceTransientAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryTransientAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/VersionAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/VersionAnnotationDefinition.java
index 3b11cce142..1147e36a4a 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/VersionAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/VersionAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -14,11 +14,11 @@ import org.eclipse.jpt.core.internal.resource.java.binary.BinaryVersionAnnotatio
import org.eclipse.jpt.core.internal.resource.java.source.SourceVersionAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.VersionAnnotation;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* javax.persistence.Version
@@ -43,15 +43,15 @@ public final class VersionAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceVersionAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceVersionAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryVersionAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAnnotatedElement.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAnnotatedElement.java
new file mode 100644
index 0000000000..0c0ae97db6
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryAnnotatedElement.java
@@ -0,0 +1,207 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.binary;
+
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.ContainerAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementIterator;
+
+/**
+ * binary annotated element
+ */
+abstract class BinaryAnnotatedElement
+ extends BinaryNode
+ implements JavaResourceAnnotatedElement
+{
+ /** JDT annotated element adapter */
+ final Adapter adapter;
+
+ /** annotations */
+ final Vector<Annotation> annotations = new Vector<Annotation>();
+
+
+ // ********** construction/initialization **********
+
+ public BinaryAnnotatedElement(JavaResourceNode parent, Adapter adapter) {
+ super(parent);
+ this.adapter = adapter;
+ this.initializeAnnotations();
+ }
+
+ private void initializeAnnotations() {
+ for (IAnnotation annotation : this.getJdtAnnotations()) {
+ this.addAnnotation(annotation);
+ }
+ }
+
+ private void addAnnotation(IAnnotation jdtAnnotation) {
+ if (this.annotationIsValid(jdtAnnotation)) {
+ this.annotations.add(this.buildAnnotation(jdtAnnotation));
+ }
+ }
+
+
+ // ********** updating **********
+
+ @Override
+ public void update() {
+ super.update();
+ this.updateAnnotations();
+ }
+
+ // TODO
+ private void updateAnnotations() {
+ throw new UnsupportedOperationException();
+ }
+
+
+ // ********** annotations **********
+
+ public Iterator<Annotation> annotations() {
+ return this.getAnnotations().iterator();
+ }
+
+ private Iterable<Annotation> getAnnotations() {
+ return new LiveCloneIterable<Annotation>(this.annotations);
+ }
+
+ public int annotationsSize() {
+ return this.annotations.size();
+ }
+
+ public Annotation getAnnotation(String annotationName) {
+ return this.selectAnnotationNamed(this.getAnnotations(), annotationName);
+ }
+
+ public Annotation getNonNullAnnotation(String annotationName) {
+ Annotation annotation = this.getAnnotation(annotationName);
+ return (annotation != null) ? annotation : this.buildNullAnnotation(annotationName);
+ }
+
+ public Iterator<NestableAnnotation> annotations(String nestableAnnotationName, String containerAnnotationName) {
+ ContainerAnnotation<NestableAnnotation> containerAnnotation = this.getContainerAnnotation(containerAnnotationName);
+ if (containerAnnotation != null) {
+ return containerAnnotation.getNestedAnnotations().iterator();
+ }
+ NestableAnnotation nestableAnnotation = this.getNestableAnnotation(nestableAnnotationName);
+ return (nestableAnnotation == null) ?
+ EmptyListIterator.<NestableAnnotation>instance() :
+ new SingleElementIterator<NestableAnnotation>(nestableAnnotation);
+ }
+
+ private NestableAnnotation getNestableAnnotation(String annotationName) {
+ return (NestableAnnotation) this.getAnnotation(annotationName);
+ }
+
+ @SuppressWarnings("unchecked")
+ private ContainerAnnotation<NestableAnnotation> getContainerAnnotation(String annotationName) {
+ return (ContainerAnnotation<NestableAnnotation>) this.getAnnotation(annotationName);
+ }
+
+ private boolean annotationIsValid(IAnnotation jdtAnnotation) {
+ return CollectionTools.contains(this.validAnnotationNames(), jdtAnnotation.getElementName());
+ }
+
+ abstract Iterator<String> validAnnotationNames();
+
+ abstract Annotation buildAnnotation(IAnnotation jdtAnnotation);
+
+ abstract Annotation buildNullAnnotation(String annotationName);
+
+
+ // ********** simple state **********
+
+ public boolean isAnnotated() {
+ return ! this.annotations.isEmpty();
+ }
+
+
+ // ********** miscellaneous **********
+
+ IJavaElement getAnnotatedElement() {
+ return this.adapter.getElement();
+ }
+
+ private Annotation selectAnnotationNamed(Iterable<Annotation> annotationList, String annotationName) {
+ for (Annotation annotation : annotationList) {
+ if (annotation.getAnnotationName().equals(annotationName)) {
+ return annotation;
+ }
+ }
+ return null;
+ }
+
+ private IAnnotation[] getJdtAnnotations() {
+ try {
+ return this.adapter.getAnnotations();
+ } catch (JavaModelException ex) {
+ JptCorePlugin.log(ex);
+ return EMPTY_JDT_ANNOTATION_ARRAY;
+ }
+ }
+ private static final IAnnotation[] EMPTY_JDT_ANNOTATION_ARRAY = new IAnnotation[0];
+
+
+ // ********** IJavaElement adapter **********
+
+ interface Adapter {
+ /**
+ * Return the adapter's JDT element (IPackageFragment, IType, IField, IMethod).
+ */
+ IJavaElement getElement();
+
+ /**
+ * Return the adapter's element's JDT annotations.
+ */
+ IAnnotation[] getAnnotations() throws JavaModelException;
+ }
+
+
+ // ********** unsupported JavaResourcePersistentMember implementation **********
+
+ public Annotation addAnnotation(String annotationName) {
+ throw new UnsupportedOperationException();
+ }
+
+ public NestableAnnotation addAnnotation(int index, String nestableAnnotationName, String containerAnnotationName) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void moveAnnotation(int targetIndex, int sourceIndex, String containerAnnotationName) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void removeAnnotation(String annotationName) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void removeAnnotation(int index, String nestableAnnotationName, String containerAnnotationName) {
+ throw new UnsupportedOperationException();
+ }
+
+ public TextRange getNameTextRange(CompilationUnit astRoot) {
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentAttribute.java
index 1b3f027257..5d8de0a927 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentAttribute.java
@@ -447,7 +447,7 @@ final class BinaryPersistentAttribute
this.field = field;
}
- public IField getMember() {
+ public IField getElement() {
return this.field;
}
@@ -503,7 +503,7 @@ final class BinaryPersistentAttribute
this.method = method;
}
- public IMethod getMember() {
+ public IMethod getElement() {
return this.method;
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentMember.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentMember.java
index 8925e3d86e..9e5c6fce3b 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentMember.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentMember.java
@@ -10,39 +10,26 @@
package org.eclipse.jpt.core.internal.resource.java.binary;
import java.util.Iterator;
-import java.util.Vector;
-
import org.eclipse.jdt.core.Flags;
-import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.JptCorePlugin;
import org.eclipse.jpt.core.resource.java.Annotation;
-import org.eclipse.jpt.core.resource.java.ContainerAnnotation;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.core.utility.TextRange;
-import org.eclipse.jpt.utility.internal.CollectionTools;
-import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
-import org.eclipse.jpt.utility.internal.iterators.EmptyListIterator;
import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-import org.eclipse.jpt.utility.internal.iterators.SingleElementIterator;
/**
* binary persistent member
*/
abstract class BinaryPersistentMember
- extends BinaryNode
+ extends BinaryAnnotatedElement
implements JavaResourcePersistentMember
{
- /** JDT member adapter */
- final Adapter adapter;
-
- /** annotations */
- final Vector<Annotation> annotations = new Vector<Annotation>();
boolean persistable;
@@ -52,95 +39,25 @@ abstract class BinaryPersistentMember
// ********** construction/initialization **********
public BinaryPersistentMember(JavaResourceNode parent, Adapter adapter) {
- super(parent);
- this.adapter = adapter;
- this.initializeAnnotations();
+ super(parent, adapter);
this.persistable = this.buildPersistable();
this.final_ = this.buildFinal();
}
- private void initializeAnnotations() {
- for (IAnnotation annotation : this.getJdtAnnotations()) {
- this.addAnnotation(annotation);
- }
- }
- private void addAnnotation(IAnnotation jdtAnnotation) {
- if (this.annotationIsValid(jdtAnnotation)) {
- this.annotations.add(this.buildAnnotation(jdtAnnotation));
- }
+ private Adapter getAdapter() {
+ return (Adapter) this.adapter;
}
-
// ********** updating **********
@Override
public void update() {
super.update();
- this.updateAnnotations();
this.setPersistable(this.buildPersistable());
this.setFinal(this.buildFinal());
}
- // TODO
- private void updateAnnotations() {
- throw new UnsupportedOperationException();
- }
-
-
- // ********** annotations **********
-
- public Iterator<Annotation> annotations() {
- return this.getAnnotations().iterator();
- }
-
- private Iterable<Annotation> getAnnotations() {
- return new LiveCloneIterable<Annotation>(this.annotations);
- }
-
- public int annotationsSize() {
- return this.annotations.size();
- }
-
- public Annotation getAnnotation(String annotationName) {
- return this.selectAnnotationNamed(this.getAnnotations(), annotationName);
- }
-
- public Annotation getNonNullAnnotation(String annotationName) {
- Annotation annotation = this.getAnnotation(annotationName);
- return (annotation != null) ? annotation : this.buildNullAnnotation(annotationName);
- }
-
- public Iterator<NestableAnnotation> annotations(String nestableAnnotationName, String containerAnnotationName) {
- ContainerAnnotation<NestableAnnotation> containerAnnotation = this.getContainerAnnotation(containerAnnotationName);
- if (containerAnnotation != null) {
- return containerAnnotation.getNestedAnnotations().iterator();
- }
- NestableAnnotation nestableAnnotation = this.getNestableAnnotation(nestableAnnotationName);
- return (nestableAnnotation == null) ?
- EmptyListIterator.<NestableAnnotation>instance() :
- new SingleElementIterator<NestableAnnotation>(nestableAnnotation);
- }
-
- private NestableAnnotation getNestableAnnotation(String annotationName) {
- return (NestableAnnotation) this.getAnnotation(annotationName);
- }
-
- @SuppressWarnings("unchecked")
- private ContainerAnnotation<NestableAnnotation> getContainerAnnotation(String annotationName) {
- return (ContainerAnnotation<NestableAnnotation>) this.getAnnotation(annotationName);
- }
-
- private boolean annotationIsValid(IAnnotation jdtAnnotation) {
- return CollectionTools.contains(this.validAnnotationNames(), jdtAnnotation.getElementName());
- }
-
- abstract Iterator<String> validAnnotationNames();
-
- abstract Annotation buildAnnotation(IAnnotation jdtAnnotation);
-
- abstract Annotation buildNullAnnotation(String annotationName);
-
// ********** simple state **********
@@ -155,7 +72,7 @@ abstract class BinaryPersistentMember
}
private boolean buildPersistable() {
- return this.adapter.isPersistable();
+ return this.getAdapter().isPersistable();
}
// ***** final
@@ -178,25 +95,11 @@ abstract class BinaryPersistentMember
}
}
-
- public boolean isAnnotated() {
- return ! this.annotations.isEmpty();
- }
-
// ********** miscellaneous **********
IMember getMember() {
- return this.adapter.getMember();
- }
-
- private Annotation selectAnnotationNamed(Iterable<Annotation> annotationList, String annotationName) {
- for (Annotation annotation : annotationList) {
- if (annotation.getAnnotationName().equals(annotationName)) {
- return annotation;
- }
- }
- return null;
+ return (IMember) this.adapter.getElement();
}
/**
@@ -226,56 +129,46 @@ abstract class BinaryPersistentMember
return Signature.toString(Signature.getTypeErasure(typeSignature));
}
- private IAnnotation[] getJdtAnnotations() {
- try {
- return this.adapter.getAnnotations();
- } catch (JavaModelException ex) {
- JptCorePlugin.log(ex);
- return EMPTY_JDT_ANNOTATION_ARRAY;
- }
- }
- private static final IAnnotation[] EMPTY_JDT_ANNOTATION_ARRAY = new IAnnotation[0];
-
// ********** IMember adapter **********
- interface Adapter {
+ interface Adapter extends BinaryAnnotatedElement.Adapter {
/**
* Return the adapter's JDT member (IType, IField, IMethod).
*/
- IMember getMember();
+ IMember getElement();
/**
* Return whether the adapter's member is "persistable"
* (i.e. according to the JPA spec the member can be mapped)
*/
boolean isPersistable();
-
- /**
- * Return the adapter's member's JDT annotations.
- */
- IAnnotation[] getAnnotations() throws JavaModelException;
}
- // ********** unsupported JavaResourcePersistentMember implementation **********
+ // ********** unsupported JavaResourceAnnotatedElement implementation **********
+ @Override
public Annotation addAnnotation(String annotationName) {
throw new UnsupportedOperationException();
}
+ @Override
public NestableAnnotation addAnnotation(int index, String nestableAnnotationName, String containerAnnotationName) {
throw new UnsupportedOperationException();
}
+ @Override
public void moveAnnotation(int targetIndex, int sourceIndex, String containerAnnotationName) {
throw new UnsupportedOperationException();
}
+ @Override
public void removeAnnotation(String annotationName) {
throw new UnsupportedOperationException();
}
+ @Override
public void removeAnnotation(int index, String nestableAnnotationName, String containerAnnotationName) {
throw new UnsupportedOperationException();
}
@@ -284,6 +177,7 @@ abstract class BinaryPersistentMember
throw new UnsupportedOperationException();
}
+ @Override
public TextRange getNameTextRange(CompilationUnit astRoot) {
throw new UnsupportedOperationException();
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentType.java
index 22ffc19866..cc8ab60755 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/binary/BinaryPersistentType.java
@@ -566,7 +566,7 @@ final class BinaryPersistentType
this.type = type;
}
- public IType getMember() {
+ public IType getElement() {
return this.type;
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAnnotatedElement.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAnnotatedElement.java
new file mode 100644
index 0000000000..21f7269431
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAnnotatedElement.java
@@ -0,0 +1,441 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.resource.java.source;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.Vector;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ASTVisitor;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.ASTNodeTextRange;
+import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.ContainerAnnotation;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.NestableAnnotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
+import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
+import org.eclipse.jpt.utility.internal.iterators.SingleElementIterator;
+
+/**
+ * Java source annotated element (annotations)
+ */
+abstract class SourceAnnotatedElement<A extends AnnotatedElement>
+ extends SourceNode
+ implements JavaResourceAnnotatedElement
+{
+ final A annotatedElement;
+
+ /**
+ * annotations; no duplicates (java compiler has an error for duplicates)
+ */
+ final Vector<Annotation> annotations = new Vector<Annotation>();
+
+
+ // ********** construction/initialization **********
+
+ SourceAnnotatedElement(JavaResourceNode parent, A annotatedElement) {
+ super(parent);
+ this.annotatedElement = annotatedElement;
+ }
+
+ public void initialize(CompilationUnit astRoot) {
+ this.annotatedElement.getBodyDeclaration(astRoot).accept(this.buildInitialAnnotationVisitor(astRoot));
+ }
+
+ private ASTVisitor buildInitialAnnotationVisitor(CompilationUnit astRoot) {
+ return new InitialAnnotationVisitor(astRoot, this.annotatedElement.getBodyDeclaration(astRoot));
+ }
+
+ /**
+ * called from {@link InitialAnnotationVisitor}
+ */
+ /* private */ void addInitialAnnotation(org.eclipse.jdt.core.dom.Annotation node, CompilationUnit astRoot) {
+ String jdtAnnotationName = ASTTools.resolveAnnotation(node);
+ if (jdtAnnotationName != null) {
+ this.addInitialAnnotation(jdtAnnotationName, astRoot);
+ }
+ }
+
+ /**
+ * pre-condition: jdtAnnotationName is not null
+ */
+ void addInitialAnnotation(String jdtAnnotationName, CompilationUnit astRoot) {
+ if (this.annotationIsValid(jdtAnnotationName)) {
+ if (this.selectAnnotationNamed(this.annotations, jdtAnnotationName) == null) { // ignore duplicates
+ Annotation annotation = this.buildAnnotation(jdtAnnotationName);
+ annotation.initialize(astRoot);
+ this.annotations.add(annotation);
+ }
+ }
+ }
+
+ public void synchronizeWith(CompilationUnit astRoot) {
+ this.syncAnnotations(astRoot);
+ }
+
+
+ // ********** annotations **********
+
+ public Iterator<Annotation> annotations() {
+ return this.getAnnotations().iterator();
+ }
+
+ Iterable<Annotation> getAnnotations() {
+ return new LiveCloneIterable<Annotation>(this.annotations);
+ }
+
+ public int annotationsSize() {
+ return this.annotations.size();
+ }
+
+ public Annotation getAnnotation(String annotationName) {
+ return this.selectAnnotationNamed(this.getAnnotations(), annotationName);
+ }
+
+ public Annotation getNonNullAnnotation(String annotationName) {
+ Annotation annotation = this.getAnnotation(annotationName);
+ return (annotation != null) ? annotation : this.buildNullAnnotation(annotationName);
+ }
+
+ public Iterator<NestableAnnotation> annotations(String nestableAnnotationName, String containerAnnotationName) {
+ ContainerAnnotation<NestableAnnotation> containerAnnotation = this.getContainerAnnotation(containerAnnotationName);
+ if (containerAnnotation != null) {
+ return containerAnnotation.getNestedAnnotations().iterator();
+ }
+ NestableAnnotation nestableAnnotation = this.getNestableAnnotation(nestableAnnotationName);
+ if (nestableAnnotation != null) {
+ return new SingleElementIterator<NestableAnnotation>(nestableAnnotation);
+ }
+ return EmptyIterator.instance();
+ }
+
+ // minimize scope of suppressed warnings
+ @SuppressWarnings("unchecked")
+ private ContainerAnnotation<NestableAnnotation> getContainerAnnotation(String annotationName) {
+ return (ContainerAnnotation<NestableAnnotation>) this.getAnnotation(annotationName);
+ }
+
+ private NestableAnnotation getNestableAnnotation(String annotationName) {
+ return (NestableAnnotation) this.getAnnotation(annotationName);
+ }
+
+ public Annotation addAnnotation(String annotationName) {
+ Annotation annotation = this.buildAnnotation(annotationName);
+ this.annotations.add(annotation);
+ annotation.newAnnotation();
+ return annotation;
+ }
+
+ /**
+ * 1. check for a container annotation;
+ * if it is present, add a nested annotation to it
+ * 2. check for a stand-alone nested annotation;
+ * if it is missing, add a stand-alone nested annotation
+ * 3. if there is an existing stand-alone nested annotation,
+ * add a container annotation and move the stand-alone nested annotation to it
+ * and add a new nested annotation to it also
+ */
+ public NestableAnnotation addAnnotation(int index, String nestableAnnotationName, String containerAnnotationName) {
+ ContainerAnnotation<NestableAnnotation> containerAnnotation = this.getContainerAnnotation(containerAnnotationName);
+ if (containerAnnotation != null) {
+ // ignore any stand-alone nestable annotations and just add to the container annotation
+ return AnnotationContainerTools.addNestedAnnotation(index, containerAnnotation);
+ }
+ NestableAnnotation standAloneAnnotation = this.getNestableAnnotation(nestableAnnotationName);
+ if (standAloneAnnotation == null) {
+ // add a stand-alone nestable annotation since neither the nestable nor the container exist
+ return (NestableAnnotation) this.addAnnotation(nestableAnnotationName);
+ }
+ // move the stand-alone nestable annotation to a container and add another nestable
+ return this.addSecondNestedAnnotation(index, containerAnnotationName, standAloneAnnotation);
+ }
+
+ /**
+ * "move" the existing nestable annotation to a new container annotation and
+ * add a new nestable annotation at the specified index (which should be 0 or 1)
+ */
+ private NestableAnnotation addSecondNestedAnnotation(int index, String containerAnnotationName, NestableAnnotation standAloneAnnotation) {
+ ContainerAnnotation<NestableAnnotation> containerAnnotation = this.buildContainerAnnotation(containerAnnotationName);
+ this.annotations.add(containerAnnotation);
+ containerAnnotation.newAnnotation();
+
+ NestableAnnotation nestedAnnotation0 = containerAnnotation.addNestedAnnotation();
+ nestedAnnotation0.newAnnotation();
+ NestableAnnotation nestedAnnotation1 = containerAnnotation.addNestedAnnotation();
+ nestedAnnotation1.newAnnotation();
+ this.removeAnnotation(standAloneAnnotation);
+
+ if (index == 0) {
+ // adding new annotation at 0, so stand-alone is "copied" to slot 1
+ nestedAnnotation1.initializeFrom(standAloneAnnotation);
+ } else {
+ // adding new annotation at 1, so stand-alone is "copied" to slot 0
+ nestedAnnotation0.initializeFrom(standAloneAnnotation);
+ }
+
+ return (index == 0) ? nestedAnnotation0 : nestedAnnotation1;
+ }
+
+ public void moveAnnotation(int targetIndex, int sourceIndex, String containerAnnotationName) {
+ this.moveAnnotation(targetIndex, sourceIndex, this.getContainerAnnotation(containerAnnotationName));
+ }
+
+ private void moveAnnotation(int targetIndex, int sourceIndex, ContainerAnnotation<NestableAnnotation> containerAnnotation) {
+ AnnotationContainerTools.moveNestedAnnotation(targetIndex, sourceIndex, containerAnnotation);
+ }
+
+ public void removeAnnotation(String annotationName) {
+ Annotation annotation = this.getAnnotation(annotationName);
+ if (annotation != null) {
+ this.removeAnnotation(annotation);
+ }
+ }
+
+ private void removeAnnotation(Annotation annotation) {
+ this.annotations.remove(annotation);
+ annotation.removeAnnotation();
+ }
+
+ public void removeAnnotation(int index, String nestableAnnotationName, String containerAnnotationName) {
+ ContainerAnnotation<NestableAnnotation> containerAnnotation = this.getContainerAnnotation(containerAnnotationName);
+ if (containerAnnotation == null) { // assume the index is 0
+ this.removeAnnotation(this.getAnnotation(nestableAnnotationName));
+ } else {
+ this.removeAnnotation(index, containerAnnotation);
+ }
+ }
+
+ /**
+ * after we remove the nested annotation, check to see whether we need to
+ * either remove the container (if it is empty) or convert the last nested
+ * annotation to a stand-alone annotation
+ */
+ private void removeAnnotation(int index, ContainerAnnotation<NestableAnnotation> containerAnnotation) {
+ AnnotationContainerTools.removeNestedAnnotation(index, containerAnnotation);
+ switch (containerAnnotation.getNestedAnnotationsSize()) {
+ case 0:
+ this.removeAnnotation(containerAnnotation);
+ break;
+ case 1:
+ this.convertLastNestedAnnotation(containerAnnotation);
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * convert the last nested annotation in the container to a stand-alone
+ * annotation
+ */
+ private void convertLastNestedAnnotation(ContainerAnnotation<NestableAnnotation> containerAnnotation) {
+ NestableAnnotation lastNestedAnnotation = containerAnnotation.getNestedAnnotations().iterator().next();
+ this.annotations.remove(containerAnnotation);
+ containerAnnotation.removeAnnotation();
+
+ NestableAnnotation standAloneAnnotation = this.buildNestableAnnotation(lastNestedAnnotation.getAnnotationName());
+ this.annotations.add(standAloneAnnotation);
+ standAloneAnnotation.newAnnotation();
+ standAloneAnnotation.initializeFrom(lastNestedAnnotation);
+ }
+
+ private boolean annotationIsValid(String annotationName) {
+ return CollectionTools.contains(this.validAnnotationNames(), annotationName);
+ }
+
+ abstract Iterator<String> validAnnotationNames();
+
+ abstract Annotation buildAnnotation(String annotationName);
+
+ abstract Annotation buildNullAnnotation(String annotationName);
+
+ // minimize scope of suppressed warnings
+ @SuppressWarnings("unchecked")
+ private ContainerAnnotation<NestableAnnotation> buildContainerAnnotation(String annotationName) {
+ return (ContainerAnnotation<NestableAnnotation>) this.buildAnnotation(annotationName);
+ }
+
+ private NestableAnnotation buildNestableAnnotation(String annotationName) {
+ return (NestableAnnotation) this.buildAnnotation(annotationName);
+ }
+
+ private void syncAnnotations(CompilationUnit astRoot) {
+ HashSet<Annotation> annotationsToRemove = new HashSet<Annotation>(this.annotations);
+
+ this.annotatedElement.getBodyDeclaration(astRoot).accept(this.buildSynchronizeAnnotationVisitor(astRoot, annotationsToRemove));
+
+ for (Annotation annotation : annotationsToRemove) {
+ this.removeItemFromCollection(annotation, this.annotations, ANNOTATIONS_COLLECTION);
+ }
+ }
+
+ private ASTVisitor buildSynchronizeAnnotationVisitor(CompilationUnit astRoot, Set<Annotation> annotationsToRemove) {
+ return new SynchronizeAnnotationVisitor(astRoot, this.annotatedElement.getBodyDeclaration(astRoot), annotationsToRemove);
+ }
+
+ /**
+ * called from {@link SynchronizeAnnotationVisitor}
+ */
+ /* private */ void addOrSyncAnnotation(org.eclipse.jdt.core.dom.Annotation node, CompilationUnit astRoot, Set<Annotation> annotationsToRemove) {
+ String jdtAnnotationName = ASTTools.resolveAnnotation(node);
+ if (jdtAnnotationName != null) {
+ this.addOrSyncAnnotation(jdtAnnotationName, astRoot, annotationsToRemove);
+ }
+ }
+
+ /**
+ * pre-condition: jdtAnnotationName is not null
+ */
+ void addOrSyncAnnotation(String jdtAnnotationName, CompilationUnit astRoot, Set<Annotation> annotationsToRemove) {
+ if (this.annotationIsValid(jdtAnnotationName)) {
+ this.addOrSyncAnnotation_(jdtAnnotationName, astRoot, annotationsToRemove);
+ }
+ }
+
+ /**
+ * pre-condition: jdtAnnotationName is valid
+ */
+ private void addOrSyncAnnotation_(String jdtAnnotationName, CompilationUnit astRoot, Set<Annotation> annotationsToRemove) {
+ Annotation annotation = this.selectAnnotationNamed(annotationsToRemove, jdtAnnotationName);
+ if (annotation != null) {
+ annotation.synchronizeWith(astRoot);
+ annotationsToRemove.remove(annotation);
+ } else {
+ annotation = this.buildAnnotation(jdtAnnotationName);
+ annotation.initialize(astRoot);
+ this.addItemToCollection(annotation, this.annotations, ANNOTATIONS_COLLECTION);
+ }
+ }
+
+
+ // ********** miscellaneous **********
+
+ public boolean isAnnotated() {
+ return ! this.annotations.isEmpty();
+ }
+
+ public TextRange getTextRange(CompilationUnit astRoot) {
+ return this.fullTextRange(astRoot);
+ }
+
+ private TextRange fullTextRange(CompilationUnit astRoot) {
+ return this.buildTextRange(this.annotatedElement.getBodyDeclaration(astRoot));
+ }
+
+ public TextRange getNameTextRange(CompilationUnit astRoot) {
+ return this.annotatedElement.getNameTextRange(astRoot);
+ }
+
+ private Annotation selectAnnotationNamed(Iterable<Annotation> list, String annotationName) {
+ for (Annotation annotation : list) {
+ if (annotation.getAnnotationName().equals(annotationName)) {
+ return annotation;
+ }
+ }
+ return null;
+ }
+
+ private TextRange buildTextRange(ASTNode astNode) {
+ return (astNode == null) ? null : new ASTNodeTextRange(astNode);
+ }
+
+
+ // ********** AST visitors **********
+
+ /**
+ * annotation visitor
+ */
+ protected static abstract class AnnotationVisitor
+ extends ASTVisitor
+ {
+ protected final CompilationUnit astRoot;
+ protected final ASTNode node;
+
+
+ protected AnnotationVisitor(CompilationUnit astRoot, ASTNode node) {
+ super();
+ this.astRoot = astRoot;
+ this.node = node;
+ }
+
+ @Override
+ public boolean visit(SingleMemberAnnotation node) {
+ return this.visit_(node);
+ }
+
+ @Override
+ public boolean visit(NormalAnnotation node) {
+ return this.visit_(node);
+ }
+
+ @Override
+ public boolean visit(MarkerAnnotation node) {
+ return this.visit_(node);
+ }
+
+ protected boolean visit_(org.eclipse.jdt.core.dom.Annotation node) {
+ // ignore annotations for child members, only this member
+ if (node.getParent() == this.node) {
+ this.visitChildAnnotation(node);
+ }
+ return false;
+ }
+
+ protected abstract void visitChildAnnotation(org.eclipse.jdt.core.dom.Annotation node);
+ }
+
+
+ /**
+ * initial annotation visitor
+ */
+ protected class InitialAnnotationVisitor
+ extends AnnotationVisitor
+ {
+ protected InitialAnnotationVisitor(CompilationUnit astRoot, ASTNode node) {
+ super(astRoot, node);
+ }
+
+ @Override
+ protected void visitChildAnnotation(org.eclipse.jdt.core.dom.Annotation node) {
+ SourceAnnotatedElement.this.addInitialAnnotation(node, this.astRoot);
+ }
+ }
+
+
+ /**
+ * synchronize annotation visitor
+ */
+ protected class SynchronizeAnnotationVisitor
+ extends AnnotationVisitor
+ {
+ protected final Set<Annotation> annotationsToRemove;
+
+ protected SynchronizeAnnotationVisitor(CompilationUnit astRoot, ASTNode node, Set<Annotation> annotationsToRemove) {
+ super(astRoot, node);
+ this.annotationsToRemove = annotationsToRemove;
+ }
+
+ @Override
+ protected void visitChildAnnotation(org.eclipse.jdt.core.dom.Annotation node) {
+ SourceAnnotatedElement.this.addOrSyncAnnotation(node, this.astRoot, this.annotationsToRemove);
+ }
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAnnotation.java
index 27e8e8c4e9..6a95185d73 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAnnotation.java
@@ -13,24 +13,24 @@ import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.Expression;
import org.eclipse.jpt.core.internal.utility.jdt.ASTNodeTextRange;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* some common state and behavior for Java source annotations;
* and lots of convenience methods
*/
-public abstract class SourceAnnotation<M extends Member>
+public abstract class SourceAnnotation<A extends AnnotatedElement>
extends SourceNode
implements Annotation
{
- protected final M member;
+ protected final A annotatedElement;
protected final DeclarationAnnotationAdapter daa;
@@ -40,16 +40,16 @@ public abstract class SourceAnnotation<M extends Member>
/**
* constructor for straight member annotation
*/
- protected SourceAnnotation(JavaResourceNode parent, M member, DeclarationAnnotationAdapter daa) {
- this(parent, member, daa, new MemberAnnotationAdapter(member, daa));
+ protected SourceAnnotation(JavaResourceNode parent, A annotatedElement, DeclarationAnnotationAdapter daa) {
+ this(parent, annotatedElement, daa, new ElementAnnotationAdapter(annotatedElement, daa));
}
/**
* constructor for nested annotation (typically)
*/
- protected SourceAnnotation(JavaResourceNode parent, M member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
+ protected SourceAnnotation(JavaResourceNode parent, A annotatedElement, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
super(parent);
- this.member = member;
+ this.annotatedElement = annotatedElement;
this.daa = daa;
this.annotationAdapter = annotationAdapter;
}
@@ -132,7 +132,7 @@ public abstract class SourceAnnotation<M extends Member>
* Return the specified AST DOM element.
*/
protected Expression getAnnotationElementExpression(DeclarationAnnotationElementAdapter<?> adapter, CompilationUnit astRoot) {
- return adapter.getExpression(this.member.getModifiedDeclaration(astRoot));
+ return adapter.getExpression(this.annotatedElement.getModifiedDeclaration(astRoot));
}
/**
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAssociationOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAssociationOverrideAnnotation.java
index ea11bfe3a6..4034302844 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAssociationOverrideAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAssociationOverrideAnnotation.java
@@ -120,7 +120,7 @@ public abstract class SourceAssociationOverrideAnnotation
}
private NestableJoinColumnAnnotation buildJoinColumn(int index) {
- return SourceJoinColumnAnnotation.createAssociationOverrideJoinColumn(this.daa, this, this.member, index);
+ return SourceJoinColumnAnnotation.createAssociationOverrideJoinColumn(this.daa, this, this.annotatedElement, index);
}
void joinColumnAdded(int index, NestableJoinColumnAnnotation joinColumn) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverrideAnnotation.java
index f3f8f3b3c3..80f9aade75 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverrideAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverrideAnnotation.java
@@ -11,8 +11,8 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.NullAttributeOverrideColumnAnnotation;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.AttributeOverrideAnnotation;
@@ -37,7 +37,7 @@ public final class SourceAttributeOverrideAnnotation
{
public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
- private final MemberAnnotationAdapter columnAdapter;
+ private final ElementAnnotationAdapter columnAdapter;
private NestableColumnAnnotation column;
@@ -45,7 +45,7 @@ public final class SourceAttributeOverrideAnnotation
public SourceAttributeOverrideAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
super(parent, member, daa, annotationAdapter);
- this.columnAdapter = new MemberAnnotationAdapter(this.member, SourceColumnAnnotation.buildAttributeOverrideAnnotationAdapter(this.daa));
+ this.columnAdapter = new ElementAnnotationAdapter(this.annotatedElement, SourceColumnAnnotation.buildAttributeOverrideAnnotationAdapter(this.daa));
}
public String getAnnotationName() {
@@ -56,7 +56,7 @@ public final class SourceAttributeOverrideAnnotation
public void initialize(CompilationUnit astRoot) {
super.initialize(astRoot);
if (this.columnAdapter.getAnnotation(astRoot) != null) {
- this.column = SourceColumnAnnotation.createAttributeOverrideColumn(this, this.member, this.daa);
+ this.column = SourceColumnAnnotation.createAttributeOverrideColumn(this, this.annotatedElement, this.daa);
this.column.initialize(astRoot);
}
}
@@ -91,7 +91,7 @@ public final class SourceAttributeOverrideAnnotation
if (this.column != null) {
throw new IllegalStateException("'column' element already exists: " + this.column); //$NON-NLS-1$
}
- this.column = SourceColumnAnnotation.createAttributeOverrideColumn(this, this.member, this.daa);
+ this.column = SourceColumnAnnotation.createAttributeOverrideColumn(this, this.annotatedElement, this.daa);
this.column.newAnnotation();
return this.column;
}
@@ -109,7 +109,7 @@ public final class SourceAttributeOverrideAnnotation
this.syncColumn_(null);
} else {
if (this.column == null) {
- NestableColumnAnnotation col = SourceColumnAnnotation.createAttributeOverrideColumn(this, this.member, this.daa);
+ NestableColumnAnnotation col = SourceColumnAnnotation.createAttributeOverrideColumn(this, this.annotatedElement, this.daa);
col.initialize(astRoot);
this.syncColumn_(col);
} else {
@@ -142,12 +142,12 @@ public final class SourceAttributeOverrideAnnotation
// ********** static methods **********
public static SourceAttributeOverrideAnnotation buildAttributeOverride(JavaResourceNode parent, Member member) {
- return new SourceAttributeOverrideAnnotation(parent, member, DECLARATION_ANNOTATION_ADAPTER, new MemberAnnotationAdapter(member, DECLARATION_ANNOTATION_ADAPTER));
+ return new SourceAttributeOverrideAnnotation(parent, member, DECLARATION_ANNOTATION_ADAPTER, new ElementAnnotationAdapter(member, DECLARATION_ANNOTATION_ADAPTER));
}
static SourceAttributeOverrideAnnotation buildNestedAttributeOverride(JavaResourceNode parent, Member member, int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, attributeOverridesAdapter);
- IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
+ IndexedAnnotationAdapter annotationAdapter = new ElementIndexedAnnotationAdapter(member, idaa);
return new SourceAttributeOverrideAnnotation(parent, member, idaa, annotationAdapter);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverridesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverridesAnnotation.java
index 21eb002c3d..b0e1f4d74f 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverridesAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceAttributeOverridesAnnotation.java
@@ -94,7 +94,7 @@ public final class SourceAttributeOverridesAnnotation
}
private NestableAttributeOverrideAnnotation buildAttributeOverride(int index) {
- return SourceAttributeOverrideAnnotation.buildNestedAttributeOverride(this, this.member, index, this.daa);
+ return SourceAttributeOverrideAnnotation.buildNestedAttributeOverride(this, this.annotatedElement, index, this.daa);
}
public NestableAttributeOverrideAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseColumnAnnotation.java
index 2dab34af2d..2ce59879c6 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseColumnAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseColumnAnnotation.java
@@ -10,7 +10,7 @@
package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.BaseColumnAnnotation;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
import org.eclipse.jpt.core.resource.java.NestableAnnotation;
@@ -51,7 +51,7 @@ public abstract class SourceBaseColumnAnnotation
protected SourceBaseColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
- this(parent, member, daa, new MemberAnnotationAdapter(member, daa));
+ this(parent, member, daa, new ElementAnnotationAdapter(member, daa));
}
protected SourceBaseColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseEnumeratedAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseEnumeratedAnnotation.java
index cd14ba5636..5d877ff49e 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseEnumeratedAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseEnumeratedAnnotation.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.resource.java.EnumType;
import org.eclipse.jpt.core.resource.java.EnumeratedAnnotation;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
@@ -37,7 +37,7 @@ public abstract class SourceBaseEnumeratedAnnotation
protected SourceBaseEnumeratedAnnotation(JavaResourceNode parent, Attribute attribute, DeclarationAnnotationAdapter daa) {
super(parent, attribute, daa);
this.valueDeclarationAdapter = new EnumDeclarationAnnotationElementAdapter(daa, getValueElementName(), false);
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(attribute, this.valueDeclarationAdapter);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, this.valueDeclarationAdapter);
}
public void initialize(CompilationUnit astRoot) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseJoinColumnAnnotation.java
index 63e1dc52b4..86a70da607 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseJoinColumnAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseJoinColumnAnnotation.java
@@ -10,8 +10,8 @@
package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.BaseJoinColumnAnnotation;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
import org.eclipse.jpt.core.resource.java.NestableAnnotation;
@@ -44,11 +44,11 @@ public abstract class SourceBaseJoinColumnAnnotation
}
protected SourceBaseJoinColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
- this(parent, member, daa, new MemberAnnotationAdapter(member, daa));
+ this(parent, member, daa, new ElementAnnotationAdapter(member, daa));
}
protected SourceBaseJoinColumnAnnotation(JavaResourceNode parent, Member member, IndexedDeclarationAnnotationAdapter idaa) {
- this(parent, member, idaa, new MemberIndexedAnnotationAdapter(member, idaa));
+ this(parent, member, idaa, new ElementIndexedAnnotationAdapter(member, idaa));
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseNamedQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseNamedQueryAnnotation.java
index 33c866bca1..2327e06502 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseNamedQueryAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseNamedQueryAnnotation.java
@@ -15,7 +15,7 @@ import java.util.Vector;
import org.eclipse.jdt.core.dom.Annotation;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.resource.java.AnnotationContainer;
import org.eclipse.jpt.core.resource.java.BaseNamedQueryAnnotation;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
@@ -78,7 +78,7 @@ abstract class SourceBaseNamedQueryAnnotation
* convenience method
*/
protected AnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new MemberAnnotationElementAdapter<String>(this.member, daea);
+ return new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, daea);
}
@Override
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTableAnnotation.java
index 237510866e..2416e19c97 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTableAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTableAnnotation.java
@@ -14,8 +14,8 @@ import java.util.Vector;
import org.eclipse.jdt.core.dom.Annotation;
import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.AnnotationContainer;
import org.eclipse.jpt.core.resource.java.BaseTableAnnotation;
@@ -63,7 +63,7 @@ public abstract class SourceBaseTableAnnotation
protected SourceBaseTableAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
- this(parent, member, daa, new MemberAnnotationAdapter(member, daa));
+ this(parent, member, daa, new ElementAnnotationAdapter(member, daa));
}
protected SourceBaseTableAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
@@ -77,7 +77,7 @@ public abstract class SourceBaseTableAnnotation
}
private AnnotationElementAdapter<String> buildAnnotationElementAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new MemberAnnotationElementAdapter<String>(this.member, daea);
+ return new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, daea);
}
public void initialize(CompilationUnit astRoot) {
@@ -259,7 +259,7 @@ public abstract class SourceBaseTableAnnotation
}
NestableUniqueConstraintAnnotation buildUniqueConstraint(int index) {
- return new SourceUniqueConstraintAnnotation(this, this.member, buildUniqueConstraintAnnotationAdapter(index));
+ return new SourceUniqueConstraintAnnotation(this, this.annotatedElement, buildUniqueConstraintAnnotationAdapter(index));
}
IndexedDeclarationAnnotationAdapter buildUniqueConstraintAnnotationAdapter(int index) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTemporalAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTemporalAnnotation.java
index 4845d65307..2995571ae0 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTemporalAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBaseTemporalAnnotation.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
import org.eclipse.jpt.core.resource.java.TemporalAnnotation;
import org.eclipse.jpt.core.resource.java.TemporalType;
@@ -38,7 +38,7 @@ public abstract class SourceBaseTemporalAnnotation
protected SourceBaseTemporalAnnotation(JavaResourceNode parent, Attribute attribute, DeclarationAnnotationAdapter daa) {
super(parent, attribute, daa);
this.valueDeclarationAdapter = new EnumDeclarationAnnotationElementAdapter(daa, getValueElementName());
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(attribute, this.valueDeclarationAdapter);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, this.valueDeclarationAdapter);
}
public void initialize(CompilationUnit astRoot) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBasicAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBasicAnnotation.java
index fe6151673c..f2bf083063 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBasicAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceBasicAnnotation.java
@@ -13,7 +13,7 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.BooleanExpressionConverter;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.BasicAnnotation;
import org.eclipse.jpt.core.resource.java.FetchType;
@@ -45,8 +45,8 @@ public final class SourceBasicAnnotation
public SourceBasicAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
- this.optionalAdapter = new MemberAnnotationElementAdapter<Boolean>(attribute, OPTIONAL_ADAPTER);
- this.fetchAdapter = new MemberAnnotationElementAdapter<String>(attribute, FETCH_ADAPTER);
+ this.optionalAdapter = new AnnotatedElementAnnotationElementAdapter<Boolean>(attribute, OPTIONAL_ADAPTER);
+ this.fetchAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, FETCH_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorColumnAnnotation.java
index e600666f3e..8bb0374ca0 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorColumnAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorColumnAnnotation.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.DiscriminatorColumnAnnotation;
import org.eclipse.jpt.core.resource.java.DiscriminatorType;
@@ -43,7 +43,7 @@ public final class SourceDiscriminatorColumnAnnotation
public SourceDiscriminatorColumnAnnotation(JavaResourcePersistentType parent, Type type) {
super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
- this.discriminatorTypeAdapter = new MemberAnnotationElementAdapter<String>(type, DISCRIMINATOR_TYPE_ADAPTER);
+ this.discriminatorTypeAdapter = new AnnotatedElementAnnotationElementAdapter<String>(type, DISCRIMINATOR_TYPE_ADAPTER);
this.lengthDeclarationAdapter = this.buildIntegerElementAdapter(JPA.DISCRIMINATOR_COLUMN__LENGTH);
this.lengthAdapter = this.buildShortCircuitIntegerElementAdapter(this.lengthDeclarationAdapter);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorValueAnnotation.java
index 17f63b8238..df25fe7c7c 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorValueAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceDiscriminatorValueAnnotation.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.DiscriminatorValueAnnotation;
import org.eclipse.jpt.core.resource.java.JPA;
@@ -38,7 +38,7 @@ public final class SourceDiscriminatorValueAnnotation
public SourceDiscriminatorValueAnnotation(JavaResourcePersistentType parent, Type type) {
super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEntityAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEntityAnnotation.java
index 8aa53f278a..5d360990c7 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEntityAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceEntityAnnotation.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.EntityAnnotation;
import org.eclipse.jpt.core.resource.java.JPA;
@@ -38,7 +38,7 @@ public final class SourceEntityAnnotation
public SourceEntityAnnotation(JavaResourcePersistentType parent, Type type) {
super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
- this.nameAdapter = new MemberAnnotationElementAdapter<String>(this.member, NAME_ADAPTER);
+ this.nameAdapter = new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, NAME_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratedValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratedValueAnnotation.java
index 75b8b9fe5f..94bf3142ca 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratedValueAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratedValueAnnotation.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.GeneratedValueAnnotation;
import org.eclipse.jpt.core.resource.java.GenerationType;
@@ -45,8 +45,8 @@ public final class SourceGeneratedValueAnnotation
public SourceGeneratedValueAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
- this.strategyAdapter = new MemberAnnotationElementAdapter<String>(attribute, STRATEGY_ADAPTER);
- this.generatorAdapter = new MemberAnnotationElementAdapter<String>(attribute, GENERATOR_ADAPTER);
+ this.strategyAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, STRATEGY_ADAPTER);
+ this.generatorAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, GENERATOR_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratorAnnotation.java
index 7e2d84fe78..ef415a7e50 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratorAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceGeneratorAnnotation.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NumberIntegerExpressionConverter;
import org.eclipse.jpt.core.resource.java.GeneratorAnnotation;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
@@ -53,11 +53,11 @@ abstract class SourceGeneratorAnnotation
}
protected AnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new MemberAnnotationElementAdapter<String>(this.member, daea);
+ return new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, daea);
}
protected AnnotationElementAdapter<Integer> buildIntegerAdapter(DeclarationAnnotationElementAdapter<Integer> daea) {
- return new MemberAnnotationElementAdapter<Integer>(this.member, daea);
+ return new AnnotatedElementAnnotationElementAdapter<Integer>(this.annotatedElement, daea);
}
public void initialize(CompilationUnit astRoot) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceIdClassAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceIdClassAnnotation.java
index 1160907e68..485eff8b71 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceIdClassAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceIdClassAnnotation.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
import org.eclipse.jpt.core.resource.java.IdClassAnnotation;
@@ -42,7 +42,7 @@ public final class SourceIdClassAnnotation
public SourceIdClassAnnotation(JavaResourcePersistentType parent, Type type) {
super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceInheritanceAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceInheritanceAnnotation.java
index e08d9abdd4..da5d8429e3 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceInheritanceAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceInheritanceAnnotation.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.InheritanceAnnotation;
import org.eclipse.jpt.core.resource.java.InheritanceType;
@@ -39,7 +39,7 @@ public final class SourceInheritanceAnnotation
public SourceInheritanceAnnotation(JavaResourcePersistentType parent, Type type) {
super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
- this.strategyAdapter = new MemberAnnotationElementAdapter<String>(type, STRATEGY_ADAPTER);
+ this.strategyAdapter = new AnnotatedElementAnnotationElementAdapter<String>(type, STRATEGY_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnAnnotation.java
index d1c8e0d657..f040d96de5 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnAnnotation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -9,8 +9,8 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.resource.java.source;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.JPA;
@@ -37,11 +37,11 @@ public final class SourceJoinColumnAnnotation
}
public SourceJoinColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
- this(parent, member, daa, new MemberAnnotationAdapter(member, daa));
+ this(parent, member, daa, new ElementAnnotationAdapter(member, daa));
}
public SourceJoinColumnAnnotation(JavaResourceNode parent, Member member, IndexedDeclarationAnnotationAdapter idaa) {
- this(parent, member, idaa, new MemberIndexedAnnotationAdapter(member, idaa));
+ this(parent, member, idaa, new ElementIndexedAnnotationAdapter(member, idaa));
}
public String getAnnotationName() {
@@ -105,7 +105,7 @@ public final class SourceJoinColumnAnnotation
static SourceJoinColumnAnnotation createNestedJoinColumn(JavaResourceNode parent, Member member, int index, DeclarationAnnotationAdapter joinColumnsAdapter) {
IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, joinColumnsAdapter);
- IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
+ IndexedAnnotationAdapter annotationAdapter = new ElementIndexedAnnotationAdapter(member, idaa);
return new SourceJoinColumnAnnotation(parent, member, idaa, annotationAdapter);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnsAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnsAnnotation.java
index 81335c57d3..ab52ca0f56 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnsAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinColumnsAnnotation.java
@@ -93,7 +93,7 @@ public final class SourceJoinColumnsAnnotation
}
private NestableJoinColumnAnnotation buildJoinColumn(int index) {
- return SourceJoinColumnAnnotation.createNestedJoinColumn(this, this.member, index, this.daa);
+ return SourceJoinColumnAnnotation.createNestedJoinColumn(this, this.annotatedElement, index, this.daa);
}
public NestableJoinColumnAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinTableAnnotation.java
index 66bc641d8f..219b32fa1f 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinTableAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceJoinTableAnnotation.java
@@ -144,7 +144,7 @@ public final class SourceJoinTableAnnotation
}
private NestableJoinColumnAnnotation buildJoinColumn(int index) {
- return new SourceJoinColumnAnnotation(this, this.member, buildJoinColumnAnnotationAdapter(index));
+ return new SourceJoinColumnAnnotation(this, this.annotatedElement, buildJoinColumnAnnotationAdapter(index));
}
private IndexedDeclarationAnnotationAdapter buildJoinColumnAnnotationAdapter(int index) {
@@ -214,7 +214,7 @@ public final class SourceJoinTableAnnotation
}
private NestableJoinColumnAnnotation buildInverseJoinColumn(int index) {
- return new SourceJoinColumnAnnotation(this, this.member, buildInverseJoinColumnAnnotationAdapter(index));
+ return new SourceJoinColumnAnnotation(this, this.annotatedElement, buildInverseJoinColumnAnnotationAdapter(index));
}
private IndexedDeclarationAnnotationAdapter buildInverseJoinColumnAnnotationAdapter(int index) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceMapKeyAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceMapKeyAnnotation.java
index 24a3087ad8..daa721257c 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceMapKeyAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceMapKeyAnnotation.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.JPA;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
@@ -38,7 +38,7 @@ public final class SourceMapKeyAnnotation
public SourceMapKeyAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
- this.nameAdapter = new MemberAnnotationElementAdapter<String>(attribute, NAME_ADAPTER);
+ this.nameAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, NAME_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedColumnAnnotation.java
index b168201eae..8806402301 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedColumnAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedColumnAnnotation.java
@@ -12,8 +12,8 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.BooleanExpressionConverter;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NumberIntegerExpressionConverter;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
import org.eclipse.jpt.core.resource.java.NamedColumnAnnotation;
@@ -45,7 +45,7 @@ public abstract class SourceNamedColumnAnnotation
protected SourceNamedColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
- this(parent, member, daa, new MemberAnnotationAdapter(member, daa));
+ this(parent, member, daa, new ElementAnnotationAdapter(member, daa));
}
protected SourceNamedColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
@@ -69,15 +69,15 @@ public abstract class SourceNamedColumnAnnotation
}
AnnotationElementAdapter<String> buildShortCircuitElementAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new MemberAnnotationElementAdapter<String>(this.member, daea);
+ return new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, daea);
}
protected AnnotationElementAdapter<Boolean> buildShortCircuitBooleanElementAdapter(DeclarationAnnotationElementAdapter<Boolean> daea) {
- return new MemberAnnotationElementAdapter<Boolean>(this.member, daea);
+ return new AnnotatedElementAnnotationElementAdapter<Boolean>(this.annotatedElement, daea);
}
protected AnnotationElementAdapter<Integer> buildShortCircuitIntegerElementAdapter(DeclarationAnnotationElementAdapter<Integer> daea) {
- return new MemberAnnotationElementAdapter<Integer>(this.member, daea);
+ return new AnnotatedElementAnnotationElementAdapter<Integer>(this.annotatedElement, daea);
}
AnnotationElementAdapter<String> buildShortCircuitStringElementAdapter(String elementName) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueriesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueriesAnnotation.java
index fba3361720..c12fdef5b5 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueriesAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueriesAnnotation.java
@@ -94,7 +94,7 @@ public final class SourceNamedNativeQueriesAnnotation
}
private NestableNamedNativeQueryAnnotation buildNamedNativeQuery(int index) {
- return SourceNamedNativeQueryAnnotation.createNestedNamedNativeQuery(this, this.member, index, this.daa);
+ return SourceNamedNativeQueryAnnotation.createNestedNamedNativeQuery(this, this.annotatedElement, index, this.daa);
}
public NestableNamedNativeQueryAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueryAnnotation.java
index b3d3483af7..2418e05a4c 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueryAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedNativeQueryAnnotation.java
@@ -12,8 +12,8 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
@@ -100,7 +100,7 @@ public final class SourceNamedNativeQueryAnnotation
@Override
NestableQueryHintAnnotation buildHint(int index) {
- return SourceQueryHintAnnotation.createNamedNativeQueryQueryHint(this, this.member, this.daa, index);
+ return SourceQueryHintAnnotation.createNamedNativeQueryQueryHint(this, this.annotatedElement, this.daa, index);
}
@@ -196,12 +196,12 @@ public final class SourceNamedNativeQueryAnnotation
// ********** static methods **********
public static SourceNamedNativeQueryAnnotation createNamedNativeQuery(JavaResourceNode parent, Type type) {
- return new SourceNamedNativeQueryAnnotation(parent, type, DECLARATION_ANNOTATION_ADAPTER, new MemberAnnotationAdapter(type, DECLARATION_ANNOTATION_ADAPTER));
+ return new SourceNamedNativeQueryAnnotation(parent, type, DECLARATION_ANNOTATION_ADAPTER, new ElementAnnotationAdapter(type, DECLARATION_ANNOTATION_ADAPTER));
}
static SourceNamedNativeQueryAnnotation createNestedNamedNativeQuery(JavaResourceNode parent, Type type, int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, attributeOverridesAdapter);
- IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(type, idaa);
+ IndexedAnnotationAdapter annotationAdapter = new ElementIndexedAnnotationAdapter(type, idaa);
return new SourceNamedNativeQueryAnnotation(parent, type, idaa, annotationAdapter);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueries1_0Annotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueries1_0Annotation.java
index 451da89edd..4d73fa4732 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueries1_0Annotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueries1_0Annotation.java
@@ -25,6 +25,6 @@ public final class SourceNamedQueries1_0Annotation
@Override
protected NestableNamedQueryAnnotation buildNamedQuery(int index) {
- return SourceNamedQueryAnnotation.createNestedNamedQuery(this, member, index, this.daa);
+ return SourceNamedQueryAnnotation.createNestedNamedQuery(this, this.annotatedElement, index, this.daa);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueryAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueryAnnotation.java
index 01c8053f22..9c178a1cc4 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueryAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceNamedQueryAnnotation.java
@@ -10,8 +10,8 @@
package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jpt.core.internal.jpa1.resource.java.source.SourceNamedQuery1_0Annotation;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.JPA;
@@ -35,7 +35,7 @@ public abstract class SourceNamedQueryAnnotation
// ********** constructors **********
public SourceNamedQueryAnnotation(JavaResourceNode parent, Type type) {
- super(parent, type, DECLARATION_ANNOTATION_ADAPTER, new MemberAnnotationAdapter(type, DECLARATION_ANNOTATION_ADAPTER));
+ super(parent, type, DECLARATION_ANNOTATION_ADAPTER, new ElementAnnotationAdapter(type, DECLARATION_ANNOTATION_ADAPTER));
}
public SourceNamedQueryAnnotation(JavaResourceNode parent, Type type, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
@@ -66,7 +66,7 @@ public abstract class SourceNamedQueryAnnotation
@Override
NestableQueryHintAnnotation buildHint(int index) {
- return SourceQueryHintAnnotation.createNamedQueryQueryHint(this, this.member, this.daa, index);
+ return SourceQueryHintAnnotation.createNamedQueryQueryHint(this, this.annotatedElement, this.daa, index);
}
@@ -74,7 +74,7 @@ public abstract class SourceNamedQueryAnnotation
static SourceNamedQueryAnnotation createNestedNamedQuery(JavaResourceNode parent, Type type, int index, DeclarationAnnotationAdapter attributeOverridesAdapter) {
IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, attributeOverridesAdapter);
- IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(type, idaa);
+ IndexedAnnotationAdapter annotationAdapter = new ElementIndexedAnnotationAdapter(type, idaa);
return new SourceNamedQuery1_0Annotation(parent, type, idaa, annotationAdapter);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOrderByAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOrderByAnnotation.java
index 08c060a41d..8f146b5eea 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOrderByAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOrderByAnnotation.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.JPA;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
@@ -38,7 +38,7 @@ public final class SourceOrderByAnnotation
public SourceOrderByAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(attribute, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, VALUE_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOverrideAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOverrideAnnotation.java
index dbb5b89a7c..c9f26ce48b 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOverrideAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceOverrideAnnotation.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
import org.eclipse.jpt.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.core.resource.java.OverrideAnnotation;
@@ -42,7 +42,7 @@ abstract class SourceOverrideAnnotation
SourceOverrideAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa, AnnotationAdapter annotationAdapter) {
super(parent, member, daa, annotationAdapter);
this.nameDeclarationAdapter = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, this.getNameElementName(), false); // false = do not remove annotation when empty
- this.nameAdapter = new MemberAnnotationElementAdapter<String>(this.member, this.nameDeclarationAdapter);
+ this.nameAdapter = new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, this.nameDeclarationAdapter);
}
public void initialize(CompilationUnit astRoot) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentAttribute.java
index 99852e1d54..6868e2c2e2 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentAttribute.java
@@ -161,7 +161,7 @@ final class SourcePersistentAttribute
@Override
Annotation buildAnnotation(String annotationName) {
- return this.getAnnotationProvider().buildAttributeAnnotation(this, this.member, annotationName);
+ return this.getAnnotationProvider().buildAttributeAnnotation(this, this.annotatedElement, annotationName);
}
Annotation buildNullAnnotation_(String annotationName) {
@@ -169,14 +169,14 @@ final class SourcePersistentAttribute
}
public boolean isFor(MethodSignature signature, int occurrence) {
- return ((MethodAttribute) this.member).matches(signature, occurrence);
+ return ((MethodAttribute) this.annotatedElement).matches(signature, occurrence);
}
// ******** JavaResourcePersistentAttribute implementation ********
public String getName() {
- return this.member.getAttributeName();
+ return this.annotatedElement.getAttributeName();
}
@Override
@@ -185,7 +185,7 @@ final class SourcePersistentAttribute
}
public boolean isField() {
- return this.member.isField();
+ return this.annotatedElement.isField();
}
public boolean isProperty() {
@@ -215,7 +215,7 @@ final class SourcePersistentAttribute
}
private ITypeBinding getTypeBinding(CompilationUnit astRoot) {
- return this.member.getTypeBinding(astRoot);
+ return this.annotatedElement.getTypeBinding(astRoot);
}
@@ -234,7 +234,7 @@ final class SourcePersistentAttribute
* zero seems like a reasonable default...
*/
private int buildModifiers(CompilationUnit astRoot) {
- IBinding binding = this.member.getBinding(astRoot);
+ IBinding binding = this.annotatedElement.getBinding(astRoot);
return (binding == null) ? 0 : binding.getModifiers();
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentMember.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentMember.java
index 8c18ed9a4c..bcfe6a851e 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentMember.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentMember.java
@@ -10,48 +10,24 @@
package org.eclipse.jpt.core.internal.resource.java.source;
import java.util.ArrayList;
-import java.util.HashSet;
import java.util.Iterator;
-import java.util.Set;
-import java.util.Vector;
-
-import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.ASTVisitor;
-import org.eclipse.jdt.core.dom.BodyDeclaration;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.IBinding;
-import org.eclipse.jdt.core.dom.MarkerAnnotation;
import org.eclipse.jdt.core.dom.Modifier;
-import org.eclipse.jdt.core.dom.NormalAnnotation;
-import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
-import org.eclipse.jpt.core.internal.utility.jdt.ASTNodeTextRange;
-import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
import org.eclipse.jpt.core.resource.java.Annotation;
-import org.eclipse.jpt.core.resource.java.ContainerAnnotation;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
-import org.eclipse.jpt.core.resource.java.NestableAnnotation;
-import org.eclipse.jpt.core.utility.TextRange;
import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.utility.internal.CollectionTools;
-import org.eclipse.jpt.utility.internal.iterables.LiveCloneIterable;
-import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
import org.eclipse.jpt.utility.internal.iterators.FilteringIterator;
-import org.eclipse.jpt.utility.internal.iterators.SingleElementIterator;
/**
* Java source persistent member (annotations, "persistable")
*/
abstract class SourcePersistentMember<M extends Member>
- extends SourceNode
+ extends SourceAnnotatedElement<M>
implements JavaResourcePersistentMember
{
- final M member;
-
- /**
- * annotations; no duplicates (java compiler has an error for duplicates)
- */
- final Vector<Annotation> annotations = new Vector<Annotation>();
boolean persistable;
@@ -61,217 +37,28 @@ abstract class SourcePersistentMember<M extends Member>
// ********** construction/initialization **********
SourcePersistentMember(JavaResourceNode parent, M member) {
- super(parent);
- this.member = member;
+ super(parent, member);
}
+ @Override
public void initialize(CompilationUnit astRoot) {
- this.member.getBodyDeclaration(astRoot).accept(this.buildInitialAnnotationVisitor(astRoot));
+ super.initialize(astRoot);
this.persistable = this.buildPersistable(astRoot);
- IBinding binding = this.member.getBinding(astRoot);
+ IBinding binding = this.annotatedElement.getBinding(astRoot);
this.final_ = this.buildFinal(binding);
}
- private ASTVisitor buildInitialAnnotationVisitor(CompilationUnit astRoot) {
- return new InitialAnnotationVisitor(astRoot, this.member.getBodyDeclaration(astRoot));
- }
-
- /**
- * called from {@link InitialAnnotationVisitor}
- */
- /* private */ void addInitialAnnotation(org.eclipse.jdt.core.dom.Annotation node, CompilationUnit astRoot) {
- String jdtAnnotationName = ASTTools.resolveAnnotation(node);
- if (jdtAnnotationName != null) {
- this.addInitialAnnotation(jdtAnnotationName, astRoot);
- }
- }
-
- /**
- * pre-condition: jdtAnnotationName is not null
- */
- void addInitialAnnotation(String jdtAnnotationName, CompilationUnit astRoot) {
- if (this.annotationIsValid(jdtAnnotationName)) {
- if (this.selectAnnotationNamed(this.annotations, jdtAnnotationName) == null) { // ignore duplicates
- Annotation annotation = this.buildAnnotation(jdtAnnotationName);
- annotation.initialize(astRoot);
- this.annotations.add(annotation);
- }
- }
- }
-
+ @Override
public void synchronizeWith(CompilationUnit astRoot) {
- this.syncAnnotations(astRoot);
+ super.synchronizeWith(astRoot);
this.syncPersistable(this.buildPersistable(astRoot));
- IBinding binding = this.member.getBinding(astRoot);
+ IBinding binding = this.annotatedElement.getBinding(astRoot);
this.syncFinal(this.buildFinal(binding));
}
// ********** annotations **********
- public Iterator<Annotation> annotations() {
- return this.getAnnotations().iterator();
- }
-
- Iterable<Annotation> getAnnotations() {
- return new LiveCloneIterable<Annotation>(this.annotations);
- }
-
- public int annotationsSize() {
- return this.annotations.size();
- }
-
- public Annotation getAnnotation(String annotationName) {
- return this.selectAnnotationNamed(this.getAnnotations(), annotationName);
- }
-
- public Annotation getNonNullAnnotation(String annotationName) {
- Annotation annotation = this.getAnnotation(annotationName);
- return (annotation != null) ? annotation : this.buildNullAnnotation(annotationName);
- }
-
- public Iterator<NestableAnnotation> annotations(String nestableAnnotationName, String containerAnnotationName) {
- ContainerAnnotation<NestableAnnotation> containerAnnotation = this.getContainerAnnotation(containerAnnotationName);
- if (containerAnnotation != null) {
- return containerAnnotation.getNestedAnnotations().iterator();
- }
- NestableAnnotation nestableAnnotation = this.getNestableAnnotation(nestableAnnotationName);
- if (nestableAnnotation != null) {
- return new SingleElementIterator<NestableAnnotation>(nestableAnnotation);
- }
- return EmptyIterator.instance();
- }
-
- // minimize scope of suppressed warnings
- @SuppressWarnings("unchecked")
- private ContainerAnnotation<NestableAnnotation> getContainerAnnotation(String annotationName) {
- return (ContainerAnnotation<NestableAnnotation>) this.getAnnotation(annotationName);
- }
-
- private NestableAnnotation getNestableAnnotation(String annotationName) {
- return (NestableAnnotation) this.getAnnotation(annotationName);
- }
-
- public Annotation addAnnotation(String annotationName) {
- Annotation annotation = this.buildAnnotation(annotationName);
- this.annotations.add(annotation);
- annotation.newAnnotation();
- return annotation;
- }
-
- /**
- * 1. check for a container annotation;
- * if it is present, add a nested annotation to it
- * 2. check for a stand-alone nested annotation;
- * if it is missing, add a stand-alone nested annotation
- * 3. if there is an existing stand-alone nested annotation,
- * add a container annotation and move the stand-alone nested annotation to it
- * and add a new nested annotation to it also
- */
- public NestableAnnotation addAnnotation(int index, String nestableAnnotationName, String containerAnnotationName) {
- ContainerAnnotation<NestableAnnotation> containerAnnotation = this.getContainerAnnotation(containerAnnotationName);
- if (containerAnnotation != null) {
- // ignore any stand-alone nestable annotations and just add to the container annotation
- return AnnotationContainerTools.addNestedAnnotation(index, containerAnnotation);
- }
- NestableAnnotation standAloneAnnotation = this.getNestableAnnotation(nestableAnnotationName);
- if (standAloneAnnotation == null) {
- // add a stand-alone nestable annotation since neither the nestable nor the container exist
- return (NestableAnnotation) this.addAnnotation(nestableAnnotationName);
- }
- // move the stand-alone nestable annotation to a container and add another nestable
- return this.addSecondNestedAnnotation(index, containerAnnotationName, standAloneAnnotation);
- }
-
- /**
- * "move" the existing nestable annotation to a new container annotation and
- * add a new nestable annotation at the specified index (which should be 0 or 1)
- */
- private NestableAnnotation addSecondNestedAnnotation(int index, String containerAnnotationName, NestableAnnotation standAloneAnnotation) {
- ContainerAnnotation<NestableAnnotation> containerAnnotation = this.buildContainerAnnotation(containerAnnotationName);
- this.annotations.add(containerAnnotation);
- containerAnnotation.newAnnotation();
-
- NestableAnnotation nestedAnnotation0 = containerAnnotation.addNestedAnnotation();
- nestedAnnotation0.newAnnotation();
- NestableAnnotation nestedAnnotation1 = containerAnnotation.addNestedAnnotation();
- nestedAnnotation1.newAnnotation();
- this.removeAnnotation(standAloneAnnotation);
-
- if (index == 0) {
- // adding new annotation at 0, so stand-alone is "copied" to slot 1
- nestedAnnotation1.initializeFrom(standAloneAnnotation);
- } else {
- // adding new annotation at 1, so stand-alone is "copied" to slot 0
- nestedAnnotation0.initializeFrom(standAloneAnnotation);
- }
-
- return (index == 0) ? nestedAnnotation0 : nestedAnnotation1;
- }
-
- public void moveAnnotation(int targetIndex, int sourceIndex, String containerAnnotationName) {
- this.moveAnnotation(targetIndex, sourceIndex, this.getContainerAnnotation(containerAnnotationName));
- }
-
- private void moveAnnotation(int targetIndex, int sourceIndex, ContainerAnnotation<NestableAnnotation> containerAnnotation) {
- AnnotationContainerTools.moveNestedAnnotation(targetIndex, sourceIndex, containerAnnotation);
- }
-
- public void removeAnnotation(String annotationName) {
- Annotation annotation = this.getAnnotation(annotationName);
- if (annotation != null) {
- this.removeAnnotation(annotation);
- }
- }
-
- private void removeAnnotation(Annotation annotation) {
- this.annotations.remove(annotation);
- annotation.removeAnnotation();
- }
-
- public void removeAnnotation(int index, String nestableAnnotationName, String containerAnnotationName) {
- ContainerAnnotation<NestableAnnotation> containerAnnotation = this.getContainerAnnotation(containerAnnotationName);
- if (containerAnnotation == null) { // assume the index is 0
- this.removeAnnotation(this.getAnnotation(nestableAnnotationName));
- } else {
- this.removeAnnotation(index, containerAnnotation);
- }
- }
-
- /**
- * after we remove the nested annotation, check to see whether we need to
- * either remove the container (if it is empty) or convert the last nested
- * annotation to a stand-alone annotation
- */
- private void removeAnnotation(int index, ContainerAnnotation<NestableAnnotation> containerAnnotation) {
- AnnotationContainerTools.removeNestedAnnotation(index, containerAnnotation);
- switch (containerAnnotation.getNestedAnnotationsSize()) {
- case 0:
- this.removeAnnotation(containerAnnotation);
- break;
- case 1:
- this.convertLastNestedAnnotation(containerAnnotation);
- break;
- default:
- break;
- }
- }
-
- /**
- * convert the last nested annotation in the container to a stand-alone
- * annotation
- */
- private void convertLastNestedAnnotation(ContainerAnnotation<NestableAnnotation> containerAnnotation) {
- NestableAnnotation lastNestedAnnotation = containerAnnotation.getNestedAnnotations().iterator().next();
- this.annotations.remove(containerAnnotation);
- containerAnnotation.removeAnnotation();
-
- NestableAnnotation standAloneAnnotation = this.buildNestableAnnotation(lastNestedAnnotation.getAnnotationName());
- this.annotations.add(standAloneAnnotation);
- standAloneAnnotation.newAnnotation();
- standAloneAnnotation.initializeFrom(lastNestedAnnotation);
- }
-
public Annotation setPrimaryAnnotation(String primaryAnnotationName, Iterable<String> supportingAnnotationNames) {
ArrayList<String> annotationNames = new ArrayList<String>();
CollectionTools.addAll(annotationNames, supportingAnnotationNames);
@@ -295,74 +82,6 @@ abstract class SourcePersistentMember<M extends Member>
return newPrimaryAnnotation;
}
- private boolean annotationIsValid(String annotationName) {
- return CollectionTools.contains(this.validAnnotationNames(), annotationName);
- }
-
- abstract Iterator<String> validAnnotationNames();
-
- abstract Annotation buildAnnotation(String mappingAnnotationName);
-
- abstract Annotation buildNullAnnotation(String annotationName);
-
- // minimize scope of suppressed warnings
- @SuppressWarnings("unchecked")
- private ContainerAnnotation<NestableAnnotation> buildContainerAnnotation(String annotationName) {
- return (ContainerAnnotation<NestableAnnotation>) this.buildAnnotation(annotationName);
- }
-
- private NestableAnnotation buildNestableAnnotation(String annotationName) {
- return (NestableAnnotation) this.buildAnnotation(annotationName);
- }
-
- private void syncAnnotations(CompilationUnit astRoot) {
- HashSet<Annotation> annotationsToRemove = new HashSet<Annotation>(this.annotations);
-
- this.member.getBodyDeclaration(astRoot).accept(this.buildSynchronizeAnnotationVisitor(astRoot, annotationsToRemove));
-
- for (Annotation annotation : annotationsToRemove) {
- this.removeItemFromCollection(annotation, this.annotations, ANNOTATIONS_COLLECTION);
- }
- }
-
- private ASTVisitor buildSynchronizeAnnotationVisitor(CompilationUnit astRoot, Set<Annotation> annotationsToRemove) {
- return new SynchronizeAnnotationVisitor(astRoot, this.member.getBodyDeclaration(astRoot), annotationsToRemove);
- }
-
- /**
- * called from {@link SynchronizeAnnotationVisitor}
- */
- /* private */ void addOrSyncAnnotation(org.eclipse.jdt.core.dom.Annotation node, CompilationUnit astRoot, Set<Annotation> annotationsToRemove) {
- String jdtAnnotationName = ASTTools.resolveAnnotation(node);
- if (jdtAnnotationName != null) {
- this.addOrSyncAnnotation(jdtAnnotationName, astRoot, annotationsToRemove);
- }
- }
-
- /**
- * pre-condition: jdtAnnotationName is not null
- */
- void addOrSyncAnnotation(String jdtAnnotationName, CompilationUnit astRoot, Set<Annotation> annotationsToRemove) {
- if (this.annotationIsValid(jdtAnnotationName)) {
- this.addOrSyncAnnotation_(jdtAnnotationName, astRoot, annotationsToRemove);
- }
- }
-
- /**
- * pre-condition: jdtAnnotationName is valid
- */
- private void addOrSyncAnnotation_(String jdtAnnotationName, CompilationUnit astRoot, Set<Annotation> annotationsToRemove) {
- Annotation annotation = this.selectAnnotationNamed(annotationsToRemove, jdtAnnotationName);
- if (annotation != null) {
- annotation.synchronizeWith(astRoot);
- annotationsToRemove.remove(annotation);
- } else {
- annotation = this.buildAnnotation(jdtAnnotationName);
- annotation.initialize(astRoot);
- this.addItemToCollection(annotation, this.annotations, ANNOTATIONS_COLLECTION);
- }
- }
-
// ********** persistable **********
@@ -377,7 +96,7 @@ abstract class SourcePersistentMember<M extends Member>
}
private boolean buildPersistable(CompilationUnit astRoot) {
- return this.member.isPersistable(astRoot);
+ return this.annotatedElement.isPersistable(astRoot);
}
// ***** final
@@ -398,43 +117,14 @@ abstract class SourcePersistentMember<M extends Member>
// ********** miscellaneous **********
- public boolean isAnnotated() {
- return ! this.annotations.isEmpty();
- }
-
public boolean isFor(String memberName, int occurrence) {
- return this.member.matches(memberName, occurrence);
- }
-
- public TextRange getTextRange(CompilationUnit astRoot) {
- return this.fullTextRange(astRoot);
- }
-
- private TextRange fullTextRange(CompilationUnit astRoot) {
- return this.buildTextRange(this.member.getBodyDeclaration(astRoot));
- }
-
- public TextRange getNameTextRange(CompilationUnit astRoot) {
- return this.member.getNameTextRange(astRoot);
+ return this.annotatedElement.matches(memberName, occurrence);
}
public void resolveTypes(CompilationUnit astRoot) {
this.syncPersistable(this.buildPersistable(astRoot));
}
- private Annotation selectAnnotationNamed(Iterable<Annotation> list, String annotationName) {
- for (Annotation annotation : list) {
- if (annotation.getAnnotationName().equals(annotationName)) {
- return annotation;
- }
- }
- return null;
- }
-
- private TextRange buildTextRange(ASTNode astNode) {
- return (astNode == null) ? null : new ASTNodeTextRange(astNode);
- }
-
/**
* convenience method
*/
@@ -446,85 +136,4 @@ abstract class SourcePersistentMember<M extends Member>
}
};
}
-
-
- // ********** AST visitors **********
-
- /**
- * annotation visitor
- */
- protected static abstract class AnnotationVisitor
- extends ASTVisitor
- {
- protected final CompilationUnit astRoot;
- protected final BodyDeclaration bodyDeclaration;
-
- protected AnnotationVisitor(CompilationUnit astRoot, BodyDeclaration bodyDeclaration) {
- super();
- this.astRoot = astRoot;
- this.bodyDeclaration = bodyDeclaration;
- }
-
- @Override
- public boolean visit(SingleMemberAnnotation node) {
- return this.visit_(node);
- }
-
- @Override
- public boolean visit(NormalAnnotation node) {
- return this.visit_(node);
- }
-
- @Override
- public boolean visit(MarkerAnnotation node) {
- return this.visit_(node);
- }
-
- protected boolean visit_(org.eclipse.jdt.core.dom.Annotation node) {
- // ignore annotations for child members, only this member
- if (node.getParent() == this.bodyDeclaration) {
- this.visitChildAnnotation(node);
- }
- return false;
- }
-
- protected abstract void visitChildAnnotation(org.eclipse.jdt.core.dom.Annotation node);
- }
-
-
- /**
- * initial annotation visitor
- */
- protected class InitialAnnotationVisitor
- extends AnnotationVisitor
- {
- protected InitialAnnotationVisitor(CompilationUnit astRoot, BodyDeclaration bodyDeclaration) {
- super(astRoot, bodyDeclaration);
- }
-
- @Override
- protected void visitChildAnnotation(org.eclipse.jdt.core.dom.Annotation node) {
- SourcePersistentMember.this.addInitialAnnotation(node, this.astRoot);
- }
- }
-
-
- /**
- * synchronize annotation visitor
- */
- protected class SynchronizeAnnotationVisitor
- extends AnnotationVisitor
- {
- protected final Set<Annotation> annotationsToRemove;
-
- protected SynchronizeAnnotationVisitor(CompilationUnit astRoot, BodyDeclaration bodyDeclaration, Set<Annotation> annotationsToRemove) {
- super(astRoot, bodyDeclaration);
- this.annotationsToRemove = annotationsToRemove;
- }
-
- @Override
- protected void visitChildAnnotation(org.eclipse.jdt.core.dom.Annotation node) {
- SourcePersistentMember.this.addOrSyncAnnotation(node, this.astRoot, this.annotationsToRemove);
- }
- }
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentType.java
index 3dccfd2ff7..138da40533 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePersistentType.java
@@ -149,7 +149,7 @@ final class SourcePersistentType
@Override
public void initialize(CompilationUnit astRoot) {
super.initialize(astRoot);
- ITypeBinding binding = this.member.getBinding(astRoot);
+ ITypeBinding binding = this.annotatedElement.getBinding(astRoot);
this.name = this.buildName(binding);
this.qualifiedName = this.buildQualifiedName(binding);
this.packageName = this.buildPackageName(binding);
@@ -176,12 +176,12 @@ final class SourcePersistentType
void addInitialAnnotation(String jdtAnnotationName, CompilationUnit astRoot) {
if (jdtAnnotationName.equals(STATIC_METAMODEL_ANNOTATION_DEFINITION.getAnnotationName())) {
if (this.staticMetamodelAnnotation == null) { // ignore duplicates
- this.staticMetamodelAnnotation = STATIC_METAMODEL_ANNOTATION_DEFINITION.buildAnnotation(this, this.member);
+ this.staticMetamodelAnnotation = STATIC_METAMODEL_ANNOTATION_DEFINITION.buildAnnotation(this, this.annotatedElement);
this.staticMetamodelAnnotation.initialize(astRoot);
}
} else if (jdtAnnotationName.equals(GENERATED_ANNOTATION_DEFINITION.getAnnotationName())) {
if (this.generatedAnnotation == null) { // ignore duplicates
- this.generatedAnnotation = GENERATED_ANNOTATION_DEFINITION.buildAnnotation(this, this.member);
+ this.generatedAnnotation = GENERATED_ANNOTATION_DEFINITION.buildAnnotation(this, this.annotatedElement);
this.generatedAnnotation.initialize(astRoot);
}
} else {
@@ -195,7 +195,7 @@ final class SourcePersistentType
@Override
public void synchronizeWith(CompilationUnit astRoot) {
super.synchronizeWith(astRoot);
- ITypeBinding binding = this.member.getBinding(astRoot);
+ ITypeBinding binding = this.annotatedElement.getBinding(astRoot);
this.syncName(this.buildName(binding));
this.syncQualifiedName(this.buildQualifiedName(binding));
this.syncPackageName(this.buildPackageName(binding));
@@ -221,7 +221,7 @@ final class SourcePersistentType
* because we also have to handle removing these annotations separately.
*/
private void syncMetamodelAnnotations(CompilationUnit astRoot) {
- ITypeBinding binding = this.member.getBinding(astRoot);
+ ITypeBinding binding = this.annotatedElement.getBinding(astRoot);
this.syncStaticMetamodelAnnotation(astRoot, binding);
this.syncGeneratedAnnotation(astRoot, binding);
}
@@ -232,7 +232,7 @@ final class SourcePersistentType
this.staticMetamodelAnnotation.synchronizeWith(astRoot);
}
else {
- StaticMetamodelAnnotation newStaticMetamodelAnnotation = STATIC_METAMODEL_ANNOTATION_DEFINITION.buildAnnotation(this, this.member);
+ StaticMetamodelAnnotation newStaticMetamodelAnnotation = STATIC_METAMODEL_ANNOTATION_DEFINITION.buildAnnotation(this, this.annotatedElement);
newStaticMetamodelAnnotation.initialize(astRoot);
this.setStaticMetamodelAnnotation(newStaticMetamodelAnnotation);
}
@@ -248,7 +248,7 @@ final class SourcePersistentType
this.generatedAnnotation.synchronizeWith(astRoot);
}
else {
- GeneratedAnnotation newGeneratedAnnotation = GENERATED_ANNOTATION_DEFINITION.buildAnnotation(this, this.member);
+ GeneratedAnnotation newGeneratedAnnotation = GENERATED_ANNOTATION_DEFINITION.buildAnnotation(this, this.annotatedElement);
newGeneratedAnnotation.initialize(astRoot);
this.setGeneratedAnnotation(newGeneratedAnnotation);
}
@@ -284,8 +284,8 @@ final class SourcePersistentType
}
@Override
- Annotation buildAnnotation(String mappingAnnotationName) {
- return this.getAnnotationProvider().buildTypeAnnotation(this, this.member, mappingAnnotationName);
+ Annotation buildAnnotation(String annotationName) {
+ return this.getAnnotationProvider().buildTypeAnnotation(this, this.annotatedElement, annotationName);
}
@Override
@@ -297,7 +297,7 @@ final class SourcePersistentType
public void resolveTypes(CompilationUnit astRoot) {
super.resolveTypes(astRoot);
- this.syncSuperclassQualifiedName(this.buildSuperclassQualifiedName(this.member.getBinding(astRoot)));
+ this.syncSuperclassQualifiedName(this.buildSuperclassQualifiedName(this.annotatedElement.getBinding(astRoot)));
for (JavaResourcePersistentAttribute field : this.getFields()) {
field.resolveTypes(astRoot);
@@ -601,7 +601,7 @@ final class SourcePersistentType
}
private void initializeTypes(CompilationUnit astRoot) {
- TypeDeclaration[] typeDeclarations = this.member.getTypes(astRoot);
+ TypeDeclaration[] typeDeclarations = this.annotatedElement.getTypes(astRoot);
CounterMap counters = new CounterMap(typeDeclarations.length);
for (TypeDeclaration td : typeDeclarations) {
String tdName = td.getName().getFullyQualifiedName();
@@ -611,7 +611,7 @@ final class SourcePersistentType
}
private void syncTypes(CompilationUnit astRoot) {
- TypeDeclaration[] typeDeclarations = this.member.getTypes(astRoot);
+ TypeDeclaration[] typeDeclarations = this.annotatedElement.getTypes(astRoot);
CounterMap counters = new CounterMap(typeDeclarations.length);
HashSet<JavaResourcePersistentType> typesToRemove = new HashSet<JavaResourcePersistentType>(this.types);
for (TypeDeclaration typeDeclaration : typeDeclarations) {
@@ -630,7 +630,7 @@ final class SourcePersistentType
}
private JavaResourcePersistentType buildType(TypeDeclaration nestedTypeDeclaration, int occurrence, CompilationUnit astRoot) {
- return newInstance(this.getJavaResourceCompilationUnit(), this.member, nestedTypeDeclaration, occurrence, astRoot);
+ return newInstance(this.getJavaResourceCompilationUnit(), this.annotatedElement, nestedTypeDeclaration, occurrence, astRoot);
}
@@ -675,7 +675,7 @@ final class SourcePersistentType
}
private void initializeFields(CompilationUnit astRoot) {
- FieldDeclaration[] fieldDeclarations = this.member.getFields(astRoot);
+ FieldDeclaration[] fieldDeclarations = this.annotatedElement.getFields(astRoot);
CounterMap counters = new CounterMap(fieldDeclarations.length);
for (FieldDeclaration fieldDeclaration : fieldDeclarations) {
for (VariableDeclarationFragment fragment : fragments(fieldDeclaration)) {
@@ -687,7 +687,7 @@ final class SourcePersistentType
}
private void syncFields(CompilationUnit astRoot) {
- FieldDeclaration[] fieldDeclarations = this.member.getFields(astRoot);
+ FieldDeclaration[] fieldDeclarations = this.annotatedElement.getFields(astRoot);
CounterMap counters = new CounterMap(fieldDeclarations.length);
HashSet<JavaResourcePersistentAttribute> fieldsToRemove = new HashSet<JavaResourcePersistentAttribute>(this.fields);
for (FieldDeclaration fieldDeclaration : fieldDeclarations) {
@@ -708,7 +708,7 @@ final class SourcePersistentType
}
private JavaResourcePersistentAttribute buildField(String fieldName, int occurrence, CompilationUnit astRoot) {
- return SourcePersistentAttribute.newInstance(this, this.member, fieldName, occurrence, this.getJavaResourceCompilationUnit(), astRoot);
+ return SourcePersistentAttribute.newInstance(this, this.annotatedElement, fieldName, occurrence, this.getJavaResourceCompilationUnit(), astRoot);
}
// minimize scope of suppressed warnings
@@ -759,7 +759,7 @@ final class SourcePersistentType
}
private void initializeMethods(CompilationUnit astRoot) {
- MethodDeclaration[] methodDeclarations = this.member.getMethods(astRoot);
+ MethodDeclaration[] methodDeclarations = this.annotatedElement.getMethods(astRoot);
CounterMap counters = new CounterMap(methodDeclarations.length);
for (MethodDeclaration methodDeclaration : methodDeclarations) {
MethodSignature signature = ASTTools.buildMethodSignature(methodDeclaration);
@@ -769,7 +769,7 @@ final class SourcePersistentType
}
private void syncMethods(CompilationUnit astRoot) {
- MethodDeclaration[] methodDeclarations = this.member.getMethods(astRoot);
+ MethodDeclaration[] methodDeclarations = this.annotatedElement.getMethods(astRoot);
CounterMap counters = new CounterMap(methodDeclarations.length);
HashSet<JavaResourcePersistentAttribute> methodsToRemove = new HashSet<JavaResourcePersistentAttribute>(this.methods);
for (MethodDeclaration methodDeclaration : methodDeclarations) {
@@ -788,7 +788,7 @@ final class SourcePersistentType
}
private JavaResourcePersistentAttribute buildMethod(MethodSignature signature, int occurrence, CompilationUnit astRoot) {
- return SourcePersistentAttribute.newInstance(this, this.member, signature, occurrence, this.getJavaResourceCompilationUnit(), astRoot);
+ return SourcePersistentAttribute.newInstance(this, this.annotatedElement, signature, occurrence, this.getJavaResourceCompilationUnit(), astRoot);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnAnnotation.java
index 65c7b71eca..592ed040af 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnAnnotation.java
@@ -10,8 +10,8 @@
package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.JPA;
@@ -49,11 +49,11 @@ public final class SourcePrimaryKeyJoinColumnAnnotation
}
public SourcePrimaryKeyJoinColumnAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
- this(parent, member, daa, new MemberAnnotationAdapter(member, daa));
+ this(parent, member, daa, new ElementAnnotationAdapter(member, daa));
}
public SourcePrimaryKeyJoinColumnAnnotation(JavaResourceNode parent, Member member, IndexedDeclarationAnnotationAdapter idaa) {
- this(parent, member, idaa, new MemberIndexedAnnotationAdapter(member, idaa));
+ this(parent, member, idaa, new ElementIndexedAnnotationAdapter(member, idaa));
}
public String getAnnotationName() {
@@ -145,7 +145,7 @@ public final class SourcePrimaryKeyJoinColumnAnnotation
static SourcePrimaryKeyJoinColumnAnnotation createNestedPrimaryKeyJoinColumn(JavaResourceNode parent, Member member, int index, DeclarationAnnotationAdapter pkJoinColumnsAdapter) {
IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, pkJoinColumnsAdapter);
- IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
+ IndexedAnnotationAdapter annotationAdapter = new ElementIndexedAnnotationAdapter(member, idaa);
return new SourcePrimaryKeyJoinColumnAnnotation(parent, member, idaa, annotationAdapter);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnsAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnsAnnotation.java
index e687955999..d98f7ffec0 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnsAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourcePrimaryKeyJoinColumnsAnnotation.java
@@ -94,7 +94,7 @@ public final class SourcePrimaryKeyJoinColumnsAnnotation
}
private NestablePrimaryKeyJoinColumnAnnotation buildPrimaryKeyJoinColumn(int index) {
- return SourcePrimaryKeyJoinColumnAnnotation.createNestedPrimaryKeyJoinColumn(this, this.member, index, this.daa);
+ return SourcePrimaryKeyJoinColumnAnnotation.createNestedPrimaryKeyJoinColumn(this, this.annotatedElement, index, this.daa);
}
public NestablePrimaryKeyJoinColumnAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceQueryHintAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceQueryHintAnnotation.java
index 4b5718b105..4bc6fcd8b8 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceQueryHintAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceQueryHintAnnotation.java
@@ -11,8 +11,8 @@ package org.eclipse.jpt.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.JPA;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
@@ -44,7 +44,7 @@ public final class SourceQueryHintAnnotation
public SourceQueryHintAnnotation(JavaResourceNode parent, Type type, IndexedDeclarationAnnotationAdapter idaa) {
- super(parent, type, idaa, new MemberIndexedAnnotationAdapter(type, idaa));
+ super(parent, type, idaa, new ElementIndexedAnnotationAdapter(type, idaa));
this.nameDeclarationAdapter = this.buildNameAdapter(idaa);
this.nameAdapter = this.buildAdapter(this.nameDeclarationAdapter);
this.valueDeclarationAdapter = this.buildValueAdapter(idaa);
@@ -56,7 +56,7 @@ public final class SourceQueryHintAnnotation
}
private AnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new MemberAnnotationElementAdapter<String>(this.member, daea);
+ return new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, daea);
}
private DeclarationAnnotationElementAdapter<String> buildNameAdapter(DeclarationAnnotationAdapter adapter) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceRelationshipMappingAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceRelationshipMappingAnnotation.java
index 7877b36f0b..099b5e5e60 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceRelationshipMappingAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceRelationshipMappingAnnotation.java
@@ -14,7 +14,7 @@ import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotation
import org.eclipse.jpt.core.internal.utility.jdt.EnumArrayDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
import org.eclipse.jpt.core.jpa2.resource.java.RelationshipMapping2_0Annotation;
import org.eclipse.jpt.core.resource.java.CascadeType;
@@ -61,15 +61,15 @@ abstract class SourceRelationshipMappingAnnotation
this.fetchDeclarationAdapter = this.getFetchAdapter();
this.fetchAdapter = this.buildAnnotationElementAdapter(this.fetchDeclarationAdapter);
this.cascadeDeclarationAdapter = this.getCascadeAdapter();
- this.cascadeAdapter = new MemberAnnotationElementAdapter<String[]>(attribute, this.cascadeDeclarationAdapter);
+ this.cascadeAdapter = new AnnotatedElementAnnotationElementAdapter<String[]>(attribute, this.cascadeDeclarationAdapter);
}
protected AnnotationElementAdapter<String> buildAnnotationElementAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new MemberAnnotationElementAdapter<String>(this.member, daea);
+ return new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, daea);
}
protected AnnotationElementAdapter<Boolean> buildBooleanAnnotationElementAdapter(DeclarationAnnotationElementAdapter<Boolean> daea) {
- return new MemberAnnotationElementAdapter<Boolean>(this.member, daea);
+ return new AnnotatedElementAnnotationElementAdapter<Boolean>(this.annotatedElement, daea);
}
public void initialize(CompilationUnit astRoot) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTableAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTableAnnotation.java
index b7cf02e2ec..8ffda243dc 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTableAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTableAnnotation.java
@@ -15,8 +15,8 @@ import java.util.Vector;
import org.eclipse.jdt.core.dom.Annotation;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.AnnotationContainer;
@@ -140,7 +140,7 @@ public final class SourceSecondaryTableAnnotation
}
private NestablePrimaryKeyJoinColumnAnnotation buildPrimaryKeyJoinColumn(int index) {
- return SourcePrimaryKeyJoinColumnAnnotation.createSecondaryTablePrimaryKeyJoinColumn(this.daa, this, this.member, index);
+ return SourcePrimaryKeyJoinColumnAnnotation.createSecondaryTablePrimaryKeyJoinColumn(this.daa, this, this.annotatedElement, index);
}
void pkJoinColumnAdded(int index, NestablePrimaryKeyJoinColumnAnnotation joinColumn) {
@@ -192,12 +192,12 @@ public final class SourceSecondaryTableAnnotation
// ********** static methods **********
public static SourceSecondaryTableAnnotation createSecondaryTable(JavaResourceNode parent, Member member) {
- return new SourceSecondaryTableAnnotation(parent, member, DECLARATION_ANNOTATION_ADAPTER, new MemberAnnotationAdapter(member, DECLARATION_ANNOTATION_ADAPTER));
+ return new SourceSecondaryTableAnnotation(parent, member, DECLARATION_ANNOTATION_ADAPTER, new ElementAnnotationAdapter(member, DECLARATION_ANNOTATION_ADAPTER));
}
static SourceSecondaryTableAnnotation createNestedSecondaryTable(JavaResourceNode parent, Member member, int index, DeclarationAnnotationAdapter secondaryTablesAdapter) {
IndexedDeclarationAnnotationAdapter idaa = buildNestedDeclarationAnnotationAdapter(index, secondaryTablesAdapter);
- IndexedAnnotationAdapter annotationAdapter = new MemberIndexedAnnotationAdapter(member, idaa);
+ IndexedAnnotationAdapter annotationAdapter = new ElementIndexedAnnotationAdapter(member, idaa);
return new SourceSecondaryTableAnnotation(parent, member, idaa, annotationAdapter);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTablesAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTablesAnnotation.java
index 4729ee7537..203e3a6cb5 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTablesAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceSecondaryTablesAnnotation.java
@@ -94,7 +94,7 @@ public final class SourceSecondaryTablesAnnotation
}
private NestableSecondaryTableAnnotation buildSecondaryTable(int index) {
- return SourceSecondaryTableAnnotation.createNestedSecondaryTable(this, this.member, index, this.daa);
+ return SourceSecondaryTableAnnotation.createNestedSecondaryTable(this, this.annotatedElement, index, this.daa);
}
public NestableSecondaryTableAnnotation moveNestedAnnotation(int targetIndex, int sourceIndex) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTableGeneratorAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTableGeneratorAnnotation.java
index fe519ded24..fa90f87b59 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTableGeneratorAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceTableGeneratorAnnotation.java
@@ -358,7 +358,7 @@ public final class SourceTableGeneratorAnnotation
}
NestableUniqueConstraintAnnotation buildUniqueConstraint(int index) {
- return new SourceUniqueConstraintAnnotation(this, this.member, buildUniqueConstraintAnnotationAdapter(index));
+ return new SourceUniqueConstraintAnnotation(this, this.annotatedElement, buildUniqueConstraintAnnotationAdapter(index));
}
IndexedDeclarationAnnotationAdapter buildUniqueConstraintAnnotationAdapter(int index) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceUniqueConstraintAnnotation.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceUniqueConstraintAnnotation.java
index 474d351479..4429e169a5 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceUniqueConstraintAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/resource/java/source/SourceUniqueConstraintAnnotation.java
@@ -16,8 +16,8 @@ import java.util.Vector;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.AnnotationStringArrayExpressionConverter;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.JPA;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
@@ -49,7 +49,7 @@ public final class SourceUniqueConstraintAnnotation
public SourceUniqueConstraintAnnotation(JavaResourceNode parent, Member member, IndexedDeclarationAnnotationAdapter idaa) {
- super(parent, member, idaa, new MemberIndexedAnnotationAdapter(member, idaa));
+ super(parent, member, idaa, new ElementIndexedAnnotationAdapter(member, idaa));
this.columnNamesDeclarationAdapter = buildArrayAnnotationElementAdapter(idaa, JPA.UNIQUE_CONSTRAINT__COLUMN_NAMES);
this.columnNamesAdapter = this.buildAnnotationElementAdapter(this.columnNamesDeclarationAdapter);
}
@@ -59,7 +59,7 @@ public final class SourceUniqueConstraintAnnotation
}
private AnnotationElementAdapter<String[]> buildAnnotationElementAdapter(DeclarationAnnotationElementAdapter<String[]> daea) {
- return new MemberAnnotationElementAdapter<String[]>(this.member, daea);
+ return new AnnotatedElementAnnotationElementAdapter<String[]>(this.annotatedElement, daea);
}
private static DeclarationAnnotationElementAdapter<String[]> buildArrayAnnotationElementAdapter(DeclarationAnnotationAdapter annotationAdapter, String elementName) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractAnnotationAdapter.java
index 09631dee2e..f68d59d8ba 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractAnnotationAdapter.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AbstractAnnotationAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,25 +12,25 @@ package org.eclipse.jpt.core.internal.utility.jdt;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.Annotation;
import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
import org.eclipse.jpt.utility.internal.StringTools;
/**
- * Adapt a member and a declaration annotation adapter.
+ * Adapt an annotated element and a declaration annotation adapter.
*/
public abstract class AbstractAnnotationAdapter implements AnnotationAdapter {
- private final Member member;
+ private final AnnotatedElement annotatedElement;
private final DeclarationAnnotationAdapter daa;
// ********** constructor **********
- public AbstractAnnotationAdapter(Member member, DeclarationAnnotationAdapter daa) {
+ public AbstractAnnotationAdapter(AnnotatedElement annotatedElement, DeclarationAnnotationAdapter daa) {
super();
- this.member = member;
+ this.annotatedElement = annotatedElement;
this.daa = daa;
}
@@ -38,7 +38,7 @@ public abstract class AbstractAnnotationAdapter implements AnnotationAdapter {
// ********** AnnotationAdapter implementation **********
public Annotation getAnnotation(CompilationUnit astRoot) {
- return this.daa.getAnnotation(this.member.getModifiedDeclaration(astRoot));
+ return this.daa.getAnnotation(this.annotatedElement.getModifiedDeclaration(astRoot));
}
public void newMarkerAnnotation() {
@@ -58,7 +58,7 @@ public abstract class AbstractAnnotationAdapter implements AnnotationAdapter {
}
public ASTNode getAstNode(CompilationUnit astRoot) {
- return this.daa.getAstNode(this.member.getModifiedDeclaration(astRoot));
+ return this.daa.getAstNode(this.annotatedElement.getModifiedDeclaration(astRoot));
}
@Override
@@ -69,33 +69,33 @@ public abstract class AbstractAnnotationAdapter implements AnnotationAdapter {
// ********** internal methods **********
- protected void edit(Member.Editor editor) {
- this.member.edit(editor);
+ protected void edit(AnnotatedElement.Editor editor) {
+ this.annotatedElement.edit(editor);
}
// ********** factory methods **********
- protected Member.Editor buildNewMarkerAnnotationEditor() {
+ protected AnnotatedElement.Editor buildNewMarkerAnnotationEditor() {
return new NewMarkerAnnotationEditor(this.daa);
}
- protected Member.Editor buildNewSingleMemberAnnotationEditor() {
+ protected AnnotatedElement.Editor buildNewSingleMemberAnnotationEditor() {
return new NewSingleMemberAnnotationEditor(this.daa);
}
- protected Member.Editor buildNewNormalAnnotationEditor() {
+ protected AnnotatedElement.Editor buildNewNormalAnnotationEditor() {
return new NewNormalAnnotationEditor(this.daa);
}
- protected Member.Editor buildRemoveAnnotationEditor() {
+ protected AnnotatedElement.Editor buildRemoveAnnotationEditor() {
return new RemoveAnnotationEditor(this.daa);
}
// ********** member classes **********
- protected static class NewMarkerAnnotationEditor implements Member.Editor {
+ protected static class NewMarkerAnnotationEditor implements AnnotatedElement.Editor {
private final DeclarationAnnotationAdapter daa;
NewMarkerAnnotationEditor(DeclarationAnnotationAdapter daa) {
@@ -112,7 +112,7 @@ public abstract class AbstractAnnotationAdapter implements AnnotationAdapter {
}
- protected static class NewSingleMemberAnnotationEditor implements Member.Editor {
+ protected static class NewSingleMemberAnnotationEditor implements AnnotatedElement.Editor {
private final DeclarationAnnotationAdapter daa;
NewSingleMemberAnnotationEditor(DeclarationAnnotationAdapter daa) {
@@ -129,7 +129,7 @@ public abstract class AbstractAnnotationAdapter implements AnnotationAdapter {
}
- protected static class NewNormalAnnotationEditor implements Member.Editor {
+ protected static class NewNormalAnnotationEditor implements AnnotatedElement.Editor {
private final DeclarationAnnotationAdapter daa;
NewNormalAnnotationEditor(DeclarationAnnotationAdapter daa) {
@@ -146,7 +146,7 @@ public abstract class AbstractAnnotationAdapter implements AnnotationAdapter {
}
- protected static class RemoveAnnotationEditor implements Member.Editor {
+ protected static class RemoveAnnotationEditor implements AnnotatedElement.Editor {
private final DeclarationAnnotationAdapter daa;
RemoveAnnotationEditor(DeclarationAnnotationAdapter daa) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberAnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AnnotatedElementAnnotationElementAdapter.java
index 89f854f2e5..5c7872d5d0 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberAnnotationElementAdapter.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/AnnotatedElementAnnotationElementAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,27 +12,27 @@ package org.eclipse.jpt.core.internal.utility.jdt;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
import org.eclipse.jpt.utility.internal.StringTools;
/**
- * Adapt a member and a declaration annotation element adapter.
+ * Adapt an annotated element and a declaration annotation element adapter.
*/
-public class MemberAnnotationElementAdapter<T>
+public class AnnotatedElementAnnotationElementAdapter<T>
implements AnnotationElementAdapter<T>
{
- private final Member member;
+ private final AnnotatedElement annotatedElement;
private final DeclarationAnnotationElementAdapter<T> daea;
// ********** constructor **********
- public MemberAnnotationElementAdapter(Member member, DeclarationAnnotationElementAdapter<T> daea) {
+ public AnnotatedElementAnnotationElementAdapter(AnnotatedElement annotatedElement, DeclarationAnnotationElementAdapter<T> daea) {
super();
- this.member = member;
+ this.annotatedElement = annotatedElement;
this.daea = daea;
}
@@ -40,11 +40,11 @@ public class MemberAnnotationElementAdapter<T>
// ********** AnnotationElementAdapter implementation **********
public T getValue() {
- return this.daea.getValue(this.member.getModifiedDeclaration());
+ return this.daea.getValue(this.annotatedElement.getModifiedDeclaration());
}
public T getValue(CompilationUnit astRoot) {
- return this.daea.getValue(this.member.getModifiedDeclaration(astRoot));
+ return this.daea.getValue(this.annotatedElement.getModifiedDeclaration(astRoot));
}
public void setValue(T value) {
@@ -52,11 +52,11 @@ public class MemberAnnotationElementAdapter<T>
}
public Expression getExpression(CompilationUnit astRoot) {
- return this.daea.getExpression(this.member.getModifiedDeclaration(astRoot));
+ return this.daea.getExpression(this.annotatedElement.getModifiedDeclaration(astRoot));
}
public ASTNode getAstNode(CompilationUnit astRoot) {
- return this.daea.getAstNode(this.member.getModifiedDeclaration(astRoot));
+ return this.daea.getAstNode(this.annotatedElement.getModifiedDeclaration(astRoot));
}
@Override
@@ -67,18 +67,18 @@ public class MemberAnnotationElementAdapter<T>
// ********** internal methods **********
- protected void edit(Member.Editor editor) {
- this.member.edit(editor);
+ protected void edit(AnnotatedElement.Editor editor) {
+ this.annotatedElement.edit(editor);
}
- protected Member.Editor buildSetValueEditor(T value) {
+ protected AnnotatedElement.Editor buildSetValueEditor(T value) {
return new SetValueEditor<T>(value, this.daea);
}
// ********** member classes **********
- protected static class SetValueEditor<T> implements Member.Editor {
+ protected static class SetValueEditor<T> implements AnnotatedElement.Editor {
private final DeclarationAnnotationElementAdapter<T> daea;
private final T value;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ElementAnnotationAdapter.java
index 5b92fa57d8..172aef3cf5 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberAnnotationAdapter.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ElementAnnotationAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -9,19 +9,19 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.utility.jdt;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
- * Adapt a member and a declaration annotation adapter.
+ * Adapt an annotated element and a declaration annotation adapter.
*/
-public class MemberAnnotationAdapter extends AbstractAnnotationAdapter {
+public class ElementAnnotationAdapter extends AbstractAnnotationAdapter {
// ********** constructor **********
- public MemberAnnotationAdapter(Member member, DeclarationAnnotationAdapter daa) {
- super(member, daa);
+ public ElementAnnotationAdapter(AnnotatedElement annotatedElement, DeclarationAnnotationAdapter daa) {
+ super(annotatedElement, daa);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberIndexedAnnotationAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ElementIndexedAnnotationAdapter.java
index aceeb48616..3c025b11a2 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/MemberIndexedAnnotationAdapter.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ElementIndexedAnnotationAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -9,16 +9,16 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.utility.jdt;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
import org.eclipse.jpt.core.utility.jdt.IndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
import org.eclipse.jpt.utility.internal.StringTools;
/**
- * Adapt a member and an indexed declaration annotation adapter.
+ * Adapt an annotated element and an indexed declaration annotation adapter.
*/
-public class MemberIndexedAnnotationAdapter
+public class ElementIndexedAnnotationAdapter
extends AbstractAnnotationAdapter
implements IndexedAnnotationAdapter
{
@@ -27,8 +27,8 @@ public class MemberIndexedAnnotationAdapter
// ********** constructor **********
- public MemberIndexedAnnotationAdapter(Member member, IndexedDeclarationAnnotationAdapter idaa) {
- super(member, idaa);
+ public ElementIndexedAnnotationAdapter(AnnotatedElement annotatedElement, IndexedDeclarationAnnotationAdapter idaa) {
+ super(annotatedElement, idaa);
this.idaa = idaa;
}
@@ -46,14 +46,14 @@ public class MemberIndexedAnnotationAdapter
// ********** factory methods **********
- protected Member.Editor buildMoveAnnotationEditor(int newIndex) {
+ protected AnnotatedElement.Editor buildMoveAnnotationEditor(int newIndex) {
return new MoveAnnotationEditor(this.idaa, newIndex);
}
// ********** member classes **********
- protected static class MoveAnnotationEditor implements Member.Editor {
+ protected static class MoveAnnotationEditor implements AnnotatedElement.Editor {
private final IndexedDeclarationAnnotationAdapter idaa;
private int index;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTAnnotatedElement.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTAnnotatedElement.java
new file mode 100644
index 0000000000..ef68d8e893
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTAnnotatedElement.java
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.internal.utility.jdt;
+
+import org.eclipse.core.filebuffers.FileBuffers;
+import org.eclipse.core.filebuffers.ITextFileBuffer;
+import org.eclipse.core.filebuffers.LocationKind;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
+import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
+import org.eclipse.jpt.utility.Command;
+import org.eclipse.jpt.utility.CommandExecutor;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.text.edits.MalformedTreeException;
+import org.eclipse.text.edits.TextEdit;
+
+/**
+ * Adapt and extend a JDT member with simplified annotation handling.
+ */
+public abstract class JDTAnnotatedElement
+ implements AnnotatedElement
+{
+
+ /** the annotated element's name (duh) */
+ private final String name;
+
+ /**
+ * the compilation unit (file) containing the annotated element;
+ * used for building an AST when we modify the annotated element
+ */
+ private final ICompilationUnit compilationUnit;
+
+ /**
+ * this allows clients to provide a way to modify the compilation unit
+ * (file) when it is open in an editor and should be modified on the UI
+ * thread
+ */
+ private final CommandExecutor modifySharedDocumentCommandExecutor;
+
+ /** this will format the annotated element's annotations a bit */
+ private final AnnotationEditFormatter annotationEditFormatter;
+
+
+ // ********** constructors **********
+
+ protected JDTAnnotatedElement(
+ String name,
+ ICompilationUnit compilationUnit,
+ CommandExecutor modifySharedDocumentCommandExecutor) {
+ this(name, compilationUnit, modifySharedDocumentCommandExecutor, DefaultAnnotationEditFormatter.instance());
+ }
+
+ protected JDTAnnotatedElement(
+ String name,
+ ICompilationUnit compilationUnit,
+ CommandExecutor modifySharedDocumentCommandExecutor,
+ AnnotationEditFormatter annotationEditFormatter) {
+ super();
+ this.name = name;
+ this.compilationUnit = compilationUnit;
+ this.modifySharedDocumentCommandExecutor = modifySharedDocumentCommandExecutor;
+ this.annotationEditFormatter = annotationEditFormatter;
+ }
+
+
+ // ********** Member implementation **********
+
+ public abstract ModifiedDeclaration getModifiedDeclaration(CompilationUnit astRoot);
+
+ public ModifiedDeclaration getModifiedDeclaration() {
+ return this.getModifiedDeclaration(this.buildASTRoot());
+ }
+
+ @Override
+ public String toString() {
+ return StringTools.buildToStringFor(this, this.name);
+ }
+
+
+ // ********** internal **********
+
+ protected String getName_() {
+ return this.name;
+ }
+
+
+ // ********** editing **********
+
+ /**
+ * Edit the member with the specified editor.
+ * The editor will be invoked once the member's compilation unit
+ * is in an editable state.
+ */
+ public void edit(Editor editor) {
+ try {
+ this.edit_(editor);
+ } catch (JavaModelException ex) {
+ throw new RuntimeException(ex);
+ } catch (BadLocationException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ /**
+ * NB: Be careful changing this method.
+ * Things to look out for:
+ * - when editing via the JavaEditor there is no need to create a working copy
+ * - when editing without an editor or via a simple text editor, a "working copy" must be created.
+ * (at least as far as I can tell ~kfm)
+ * - sharedDocument is only ever false in tests (headless mode). In the UI, even if the file
+ * is not open in an editor, sharedDocument is still true (buffer is not null)
+ * - if a working copy is created, then we must discard it
+ */
+ protected void edit_(Editor editor) throws JavaModelException, BadLocationException {
+ boolean createWorkingCopy = ! this.compilationUnit.isWorkingCopy();
+ if (createWorkingCopy) {
+ this.compilationUnit.becomeWorkingCopy(null);
+ }
+
+ ITextFileBuffer buffer = FileBuffers.getTextFileBufferManager().getTextFileBuffer(this.compilationUnit.getResource().getFullPath(), LocationKind.NORMALIZE);
+ boolean sharedDocument = (buffer != null); // documents are typically shared when they are already open in an editor
+ IDocument doc = sharedDocument ?
+ buffer.getDocument() :
+ new Document(this.compilationUnit.getBuffer().getContents());
+
+ try {
+ CompilationUnit astRoot = this.buildASTRoot();
+ astRoot.recordModifications();
+
+ editor.edit(this.getModifiedDeclaration(astRoot));
+
+ TextEdit edits = astRoot.rewrite(doc, this.compilationUnit.getJavaProject().getOptions(true));
+ if (sharedDocument) {
+ this.modifySharedDocumentCommandExecutor.execute(new ModifySharedDocumentCommand(edits, doc));
+ } else {
+ this.applyEdits(edits, doc);
+ }
+ }
+ finally {
+ if (createWorkingCopy) {
+ //discardWorkingCopy must be called every time becomeWorkingCopy is called.
+ this.compilationUnit.getBuffer().setContents(doc.get());
+ this.compilationUnit.commitWorkingCopy(true, null); // true="force"
+ this.compilationUnit.discardWorkingCopy();
+ }
+ }
+ }
+
+ /**
+ * apply the specified edits to the specified document,
+ * reformatting the document if necessary
+ */
+ protected void applyEdits(TextEdit edits, IDocument doc) throws MalformedTreeException, BadLocationException {
+ edits.apply(doc, TextEdit.UPDATE_REGIONS);
+ this.annotationEditFormatter.format(doc, edits);
+ }
+
+ protected CompilationUnit buildASTRoot() {
+ return ASTTools.buildASTRoot(this.compilationUnit);
+ }
+
+
+ // ********** modify shared document command class **********
+
+ /**
+ * simple command that calls back to the member to apply the edits
+ * in the same way as if the document were not shared
+ */
+ protected class ModifySharedDocumentCommand implements Command {
+ private final TextEdit edits;
+ private final IDocument doc;
+
+ protected ModifySharedDocumentCommand(TextEdit edits, IDocument doc) {
+ super();
+ this.edits = edits;
+ this.doc = doc;
+ }
+
+ public void execute() {
+ try {
+ JDTAnnotatedElement.this.applyEdits(this.edits, this.doc);
+ } catch (MalformedTreeException ex) {
+ throw new RuntimeException(ex);
+ } catch (BadLocationException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ }
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTFieldAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTFieldAttribute.java
index 1c18f297cb..a349ef2666 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTFieldAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTFieldAttribute.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2009 Oracle. All rights reserved.
+ * Copyright (c) 2005, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -10,7 +10,6 @@
package org.eclipse.jpt.core.internal.utility.jdt;
import java.util.List;
-
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.CompilationUnit;
@@ -21,6 +20,7 @@ import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
import org.eclipse.jpt.core.utility.TextRange;
import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
import org.eclipse.jpt.core.utility.jdt.FieldAttribute;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
import org.eclipse.jpt.core.utility.jdt.Type;
import org.eclipse.jpt.utility.CommandExecutor;
@@ -64,6 +64,10 @@ public class JDTFieldAttribute
// ********** Member/Attribute/FieldAttribute implementation **********
+ @Override
+ public ModifiedDeclaration getModifiedDeclaration(CompilationUnit astRoot) {
+ return new JDTModifiedDeclaration(this.getBodyDeclaration(astRoot));
+ }
public IVariableBinding getBinding(CompilationUnit astRoot) {
return this.getFragment(astRoot).resolveBinding();
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMember.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMember.java
index c7c5ebbdb6..a250509ee6 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMember.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMember.java
@@ -9,59 +9,28 @@
******************************************************************************/
package org.eclipse.jpt.core.internal.utility.jdt;
-import org.eclipse.core.filebuffers.FileBuffers;
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.filebuffers.LocationKind;
import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
import org.eclipse.jpt.core.utility.jdt.Member;
-import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
import org.eclipse.jpt.core.utility.jdt.Type;
-import org.eclipse.jpt.utility.Command;
import org.eclipse.jpt.utility.CommandExecutor;
-import org.eclipse.jpt.utility.internal.StringTools;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.TextEdit;
/**
* Adapt and extend a JDT member with simplified annotation handling.
*/
-public abstract class JDTMember
+public abstract class JDTMember extends JDTAnnotatedElement
implements Member
{
+
/** this will be null for the primary type */
private final Type declaringType;
- /** the member's name (duh) */
- private final String name;
-
/**
* members can occur more than once in non-compiling source;
* count starts at 1; the primary type will have occurrence 1
*/
private final int occurrence;
- /**
- * the compilation unit (file) containing the member;
- * used for building an AST when we modify the member
- */
- private final ICompilationUnit compilationUnit;
-
- /**
- * this allows clients to provide a way to modify the compilation unit
- * (file) when it is open in an editor and should be modified on the UI
- * thread
- */
- private final CommandExecutor modifySharedDocumentCommandExecutor;
-
- /** this will format the member's annotations a bit */
- private final AnnotationEditFormatter annotationEditFormatter;
-
// ********** constructors **********
@@ -81,42 +50,21 @@ public abstract class JDTMember
ICompilationUnit compilationUnit,
CommandExecutor modifySharedDocumentCommandExecutor,
AnnotationEditFormatter annotationEditFormatter) {
- super();
+ super(name, compilationUnit, modifySharedDocumentCommandExecutor, annotationEditFormatter);
this.declaringType = declaringType;
- this.name = name;
this.occurrence = occurrence;
- this.compilationUnit = compilationUnit;
- this.modifySharedDocumentCommandExecutor = modifySharedDocumentCommandExecutor;
- this.annotationEditFormatter = annotationEditFormatter;
}
// ********** Member implementation **********
- public ModifiedDeclaration getModifiedDeclaration(CompilationUnit astRoot) {
- return new JDTModifiedDeclaration(this.getBodyDeclaration(astRoot));
- }
-
- public ModifiedDeclaration getModifiedDeclaration() {
- return this.getModifiedDeclaration(this.buildASTRoot());
- }
-
public boolean matches(String memberName, int occur) {
- return memberName.equals(this.name) && (occur == this.occurrence);
- }
-
- @Override
- public String toString() {
- return StringTools.buildToStringFor(this, this.name);
+ return memberName.equals(this.getName_()) && (occur == this.occurrence);
}
// ********** internal **********
- protected String getName_() {
- return this.name;
- }
-
protected int getOccurrence() {
return this.occurrence;
}
@@ -128,109 +76,4 @@ public abstract class JDTMember
return this.declaringType;
}
-
- // ********** editing **********
-
- /**
- * Edit the member with the specified editor.
- * The editor will be invoked once the member's compilation unit
- * is in an editable state.
- */
- public void edit(Editor editor) {
- try {
- this.edit_(editor);
- } catch (JavaModelException ex) {
- throw new RuntimeException(ex);
- } catch (BadLocationException ex) {
- throw new RuntimeException(ex);
- }
- }
-
- /**
- * NB: Be careful changing this method.
- * Things to look out for:
- * - when editing via the JavaEditor there is no need to create a working copy
- * - when editing without an editor or via a simple text editor, a "working copy" must be created.
- * (at least as far as I can tell ~kfm)
- * - sharedDocument is only ever false in tests (headless mode). In the UI, even if the file
- * is not open in an editor, sharedDocument is still true (buffer is not null)
- * - if a working copy is created, then we must discard it
- */
- protected void edit_(Editor editor) throws JavaModelException, BadLocationException {
- boolean createWorkingCopy = ! this.compilationUnit.isWorkingCopy();
- if (createWorkingCopy) {
- this.compilationUnit.becomeWorkingCopy(null);
- }
-
- ITextFileBuffer buffer = FileBuffers.getTextFileBufferManager().getTextFileBuffer(this.compilationUnit.getResource().getFullPath(), LocationKind.NORMALIZE);
- boolean sharedDocument = (buffer != null); // documents are typically shared when they are already open in an editor
- IDocument doc = sharedDocument ?
- buffer.getDocument() :
- new Document(this.compilationUnit.getBuffer().getContents());
-
- try {
- CompilationUnit astRoot = this.buildASTRoot();
- astRoot.recordModifications();
-
- editor.edit(this.getModifiedDeclaration(astRoot));
-
- TextEdit edits = astRoot.rewrite(doc, this.compilationUnit.getJavaProject().getOptions(true));
- if (sharedDocument) {
- this.modifySharedDocumentCommandExecutor.execute(new ModifySharedDocumentCommand(edits, doc));
- } else {
- this.applyEdits(edits, doc);
- }
- }
- finally {
- if (createWorkingCopy) {
- //discardWorkingCopy must be called every time becomeWorkingCopy is called.
- this.compilationUnit.getBuffer().setContents(doc.get());
- this.compilationUnit.commitWorkingCopy(true, null); // true="force"
- this.compilationUnit.discardWorkingCopy();
- }
- }
- }
-
- /**
- * apply the specified edits to the specified document,
- * reformatting the document if necessary
- */
- protected void applyEdits(TextEdit edits, IDocument doc) throws MalformedTreeException, BadLocationException {
- edits.apply(doc, TextEdit.UPDATE_REGIONS);
- this.annotationEditFormatter.format(doc, edits);
- }
-
- protected CompilationUnit buildASTRoot() {
- return ASTTools.buildASTRoot(this.compilationUnit);
- }
-
-
- // ********** modify shared document command class **********
-
- /**
- * simple command that calls back to the member to apply the edits
- * in the same way as if the document were not shared
- */
- protected class ModifySharedDocumentCommand implements Command {
- private final TextEdit edits;
- private final IDocument doc;
-
- protected ModifySharedDocumentCommand(TextEdit edits, IDocument doc) {
- super();
- this.edits = edits;
- this.doc = doc;
- }
-
- public void execute() {
- try {
- JDTMember.this.applyEdits(this.edits, this.doc);
- } catch (MalformedTreeException ex) {
- throw new RuntimeException(ex);
- } catch (BadLocationException ex) {
- throw new RuntimeException(ex);
- }
- }
-
- }
-
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMethodAttribute.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMethodAttribute.java
index 4316d6c198..7319389aa0 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMethodAttribute.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTMethodAttribute.java
@@ -11,7 +11,6 @@ package org.eclipse.jpt.core.internal.utility.jdt;
import java.util.Arrays;
import java.util.List;
-
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.IMethodBinding;
@@ -21,6 +20,7 @@ import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
import org.eclipse.jpt.core.utility.TextRange;
import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
import org.eclipse.jpt.core.utility.jdt.MethodAttribute;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
import org.eclipse.jpt.core.utility.jdt.Type;
import org.eclipse.jpt.utility.CommandExecutor;
import org.eclipse.jpt.utility.JavaType;
@@ -96,7 +96,11 @@ public class JDTMethodAttribute
// ********** Member/Attribute/MethodAttribute implementation **********
-
+ @Override
+ public ModifiedDeclaration getModifiedDeclaration(CompilationUnit astRoot) {
+ return new JDTModifiedDeclaration(this.getBodyDeclaration(astRoot));
+ }
+
public IMethodBinding getBinding(CompilationUnit astRoot) {
return this.getBodyDeclaration(astRoot).resolveBinding();
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTModifiedDeclaration.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTModifiedDeclaration.java
index 96f2c739e7..ace750d340 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTModifiedDeclaration.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTModifiedDeclaration.java
@@ -12,7 +12,6 @@ package org.eclipse.jpt.core.internal.utility.jdt;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
-
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
@@ -24,6 +23,7 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.IExtendedModifier;
import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.ImportDeclaration;
+import org.eclipse.jdt.core.dom.PackageDeclaration;
import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
@@ -53,6 +53,10 @@ public class JDTModifiedDeclaration
public JDTModifiedDeclaration(BodyDeclaration declaration) {
this(new BodyDeclarationAdapter(declaration));
}
+
+ public JDTModifiedDeclaration(PackageDeclaration declaration) {
+ this(new PackageDeclarationAdapter(declaration));
+ }
public JDTModifiedDeclaration(SingleVariableDeclaration declaration) {
this(new SingleVariableDeclarationAdapter(declaration));
@@ -476,6 +480,49 @@ public class JDTModifiedDeclaration
return StringTools.buildToStringFor(this, this.declaration.toString());
}
}
+
+ public static class PackageDeclarationAdapter implements Adapter {
+ private final PackageDeclaration declaration;
+ public PackageDeclarationAdapter(PackageDeclaration declaration) {
+ super();
+ this.declaration = declaration;
+ }
+ public ASTNode getDeclaration() {
+ return this.declaration;
+ }
+ @SuppressWarnings("unchecked")
+ public List<IExtendedModifier> getModifiers() {
+ return this.declaration.annotations();
+ }
+ @Override
+ public String toString() {
+ return StringTools.buildToStringFor(this, this.declaration.toString());
+ }
+ }
+
+ /*public static class ASTNodeAdapter implements Adapter {
+ private final ASTNode declaration;
+ public ASTNodeAdapter(ASTNode declaration) {
+ super();
+ this.declaration = declaration;
+ }
+ public ASTNode getDeclaration() {
+ return this.declaration;
+ }
+ @SuppressWarnings("unchecked")
+ public List<IExtendedModifier> getModifiers() {
+ if (declaration instanceof BodyDeclaration) {
+ return ((BodyDeclaration) declaration).modifiers();
+ } else if (declaration instanceof PackageDeclaration) {
+ return ((PackageDeclaration) declaration).annotations();
+ }
+ return Collections.emptyList();
+ }
+ @Override
+ public String toString() {
+ return StringTools.buildToStringFor(this, this.declaration.toString());
+ }
+ }*/
public static class SingleVariableDeclarationAdapter implements Adapter {
private final SingleVariableDeclaration declaration;
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTType.java
index f3438cfe8f..95b6a82210 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/JDTType.java
@@ -10,7 +10,6 @@
package org.eclipse.jpt.core.internal.utility.jdt;
import java.util.List;
-
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
@@ -21,6 +20,7 @@ import org.eclipse.jdt.core.dom.MethodDeclaration;
import org.eclipse.jdt.core.dom.TypeDeclaration;
import org.eclipse.jpt.core.utility.TextRange;
import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
+import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
import org.eclipse.jpt.core.utility.jdt.Type;
import org.eclipse.jpt.utility.CommandExecutor;
@@ -87,7 +87,11 @@ public class JDTType
// ********** Member/Type implementation **********
-
+ @Override
+ public ModifiedDeclaration getModifiedDeclaration(CompilationUnit astRoot) {
+ return new JDTModifiedDeclaration(this.getBodyDeclaration(astRoot));
+ }
+
public ITypeBinding getBinding(CompilationUnit astRoot) {
TypeDeclaration td = this.getBodyDeclaration(astRoot);
return (td == null) ? null : td.resolveBinding();
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitAnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitAnnotationElementAdapter.java
index 44c27535c8..7560f54ca3 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitAnnotationElementAdapter.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitAnnotationElementAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,9 +12,9 @@ package org.eclipse.jpt.core.internal.utility.jdt;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.utility.internal.StringTools;
/**
@@ -30,8 +30,8 @@ public class ShortCircuitAnnotationElementAdapter<T>
// ********** constructor **********
- public ShortCircuitAnnotationElementAdapter(Member member, DeclarationAnnotationElementAdapter<T> daea) {
- this(new MemberAnnotationElementAdapter<T>(member, daea));
+ public ShortCircuitAnnotationElementAdapter(AnnotatedElement annotatedElement, DeclarationAnnotationElementAdapter<T> daea) {
+ this(new AnnotatedElementAnnotationElementAdapter<T>(annotatedElement, daea));
}
public ShortCircuitAnnotationElementAdapter(AnnotationElementAdapter<T> adapter) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitArrayAnnotationElementAdapter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitArrayAnnotationElementAdapter.java
index 01952fe059..5eff405a48 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitArrayAnnotationElementAdapter.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/utility/jdt/ShortCircuitArrayAnnotationElementAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -10,9 +10,9 @@
package org.eclipse.jpt.core.internal.utility.jdt;
import java.util.Arrays;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.utility.jdt.Member;
/**
* Wrap another annotation element adapter and short-circuit the
@@ -24,8 +24,8 @@ public class ShortCircuitArrayAnnotationElementAdapter<T>
{
// ********** constructor **********
- public ShortCircuitArrayAnnotationElementAdapter(Member member, DeclarationAnnotationElementAdapter<T[]> daea) {
- super(member, daea);
+ public ShortCircuitArrayAnnotationElementAdapter(AnnotatedElement annotatedElement, DeclarationAnnotationElementAdapter<T[]> daea) {
+ super(annotatedElement, daea);
}
public ShortCircuitArrayAnnotationElementAdapter(AnnotationElementAdapter<T[]> adapter) {
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AnnotationDefinition.java
index fe2149d80e..46ac4f9213 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/AnnotationDefinition.java
@@ -10,7 +10,7 @@
package org.eclipse.jpt.core.resource.java;
import org.eclipse.jdt.core.IAnnotation;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
/**
* Used to build Annotations discovered in the Java source code.
@@ -27,7 +27,7 @@ import org.eclipse.jpt.core.utility.jdt.Member;
* 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
+ * @version 3.0
* @since 2.0
*/
public interface AnnotationDefinition
@@ -39,18 +39,18 @@ public interface AnnotationDefinition
String getAnnotationName();
/**
- * Build and return an annotation for the specified member.
+ * Build and return an annotation for the specified annotated element.
*/
- Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member);
+ Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement);
/**
* Build and return an annotation for the specified JDT annotation
- * on the specified member.
+ * on the specified annotated element.
*/
- Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation);
+ Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation);
/**
- * Build and return a "null" annotation for the specified member.
+ * Build and return a "null" annotation for the specified annotated element.
* Only certain annotations are required to have "null" implementations;
* typically the annotations with reasonably complex default behavior.
* The "null" annotation is used by the corresponding default context model.
@@ -60,6 +60,6 @@ public interface AnnotationDefinition
* new state to it. This reduces the number of null checks in the context
* model (hopefully).
*/
- Annotation buildNullAnnotation(JavaResourcePersistentMember parent);
+ Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent);
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourceAnnotatedElement.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourceAnnotatedElement.java
new file mode 100644
index 0000000000..81f4c83287
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourceAnnotatedElement.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.resource.java;
+
+import java.util.Iterator;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Java source code or binary annotated element.
+ * <p>
+ * 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
+ * @since 3.0
+ */
+public interface JavaResourceAnnotatedElement
+ extends JavaResourceNode
+{
+ // ********** annotations **********
+
+ /**
+ * String associated with changes to the "annotations" collection
+ */
+ String ANNOTATIONS_COLLECTION = "annotations"; //$NON-NLS-1$
+
+ /**
+ * Return the member's annotations in the order that they appear.
+ * Do not return duplicate annotations as this error is handled by the Java
+ * compiler.
+ */
+ Iterator<Annotation> annotations();
+
+ /**
+ * Return the number of annotations.
+ */
+ int annotationsSize();
+
+ /**
+ * Return the annotation with the specified name.
+ * Return the first if there are duplicates in the source code.
+ */
+ Annotation getAnnotation(String annotationName);
+
+ /**
+ * Return the specified annotation.
+ * Return the first if there are duplicates in the source code.
+ * Do not return null, but a Null Object instead if no annotation
+ * with the specified name exists in the source code.
+ */
+ Annotation getNonNullAnnotation(String annotationName);
+
+ /**
+ * Return the nestable annotations with the specified name in the order that
+ * they appear.
+ * If nestable and container annotations are both specified on the
+ * member directly, return only the nestable annotations specified within
+ * the container annotation.
+ */
+ // TODO tie the singular and plural annotations together so we can generate
+ // a validation error when both are specified
+ Iterator<NestableAnnotation> annotations(String nestableAnnotationName, String containerAnnotationName);
+
+ /**
+ * Add an annotation with the specified name.
+ * Return the newly-created annotation.
+ */
+ Annotation addAnnotation(String annotationName);
+
+ /**
+ * Add a new nestable annotation with the specified name.
+ * Create a new container annotation if necessary and add the nestable
+ * annotation to it.
+ * If both the nestable annotation and the container annotation already
+ * exist, then add to the container annotation, leaving the existing
+ * nestable annotation alone.
+ * If only the nestable annotation exists, then create the new container
+ * annotation and move the existing nestable annotation to it along with
+ * the new one. If neither annotation exists, then create a new nestable
+ * annotation.
+ */
+ NestableAnnotation addAnnotation(int index, String nestableAnnotationName, String containerAnnotationName);
+
+ /**
+ * Move the nestable annotation found in the specified container
+ * annotation at the specified source index to the specified target index.
+ */
+ void moveAnnotation(int targetIndex, int sourceIndex, String containerAnnotationName);
+
+ /**
+ * Remove the specified annotation.
+ */
+ void removeAnnotation(String annotationName);
+
+ /**
+ * Remove the specified nestable annotation from the container annotation at the specified
+ * index.
+ * If there is no container, assume the index is zero and this does the same as
+ * {@link #removeAnnotation(String)}
+ */
+ void removeAnnotation(int index, String nestableAnnotationName, String containerAnnotationName);
+
+
+ // ********** queries **********
+
+ /**
+ * Return whether the underlying JDT member is currently annotated with any recognized
+ * annotations.
+ */
+ boolean isAnnotated();
+
+ /**
+ * Return the text range for the member's name.
+ */
+ TextRange getNameTextRange(CompilationUnit astRoot);
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentMember.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentMember.java
index 83adbce63b..e646137fe8 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentMember.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/resource/java/JavaResourcePersistentMember.java
@@ -9,9 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.core.resource.java;
-import java.util.Iterator;
import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.core.utility.TextRange;
/**
* Java source code or binary persistent member.
@@ -22,103 +20,23 @@ import org.eclipse.jpt.core.utility.TextRange;
* pioneering adopters on the understanding that any code that uses this API
* will almost certainly be broken (repeatedly) as the API evolves.
*
- * @version 2.3
+ * @version 3.0
* @since 2.0
*/
public interface JavaResourcePersistentMember
- extends JavaResourceNode
+ extends JavaResourceAnnotatedElement
{
+
// ********** annotations **********
/**
- * String associated with changes to the "annotations" collection
- */
- String ANNOTATIONS_COLLECTION = "annotations"; //$NON-NLS-1$
-
- /**
- * Return the member's annotations in the order that they appear.
- * Do not return duplicate annotations as this error is handled by the Java
- * compiler.
- */
- Iterator<Annotation> annotations();
-
- /**
- * Return the number of annotations.
- */
- int annotationsSize();
-
- /**
- * Return the annotation with the specified name.
- * Return the first if there are duplicates in the source code.
- */
- Annotation getAnnotation(String annotationName);
-
- /**
- * Return the specified annotation.
- * Return the first if there are duplicates in the source code.
- * Do not return null, but a Null Object instead if no annotation
- * with the specified name exists in the source code.
- */
- Annotation getNonNullAnnotation(String annotationName);
-
- /**
- * Return the nestable annotations with the specified name in the order that
- * they appear.
- * If nestable and container annotations are both specified on the
- * member directly, return only the nestable annotations specified within
- * the container annotation.
- */
- // TODO tie the singular and plural annotations together so we can generate
- // a validation error when both are specified
- Iterator<NestableAnnotation> annotations(String nestableAnnotationName, String containerAnnotationName);
-
- /**
- * Add an annotation with the specified name.
- * Return the newly-created annotation.
- */
- Annotation addAnnotation(String annotationName);
-
- /**
- * Add a new nestable annotation with the specified name.
- * Create a new container annotation if necessary and add the nestable
- * annotation to it.
- * If both the nestable annotation and the container annotation already
- * exist, then add to the container annotation, leaving the existing
- * nestable annotation alone.
- * If only the nestable annotation exists, then create the new container
- * annotation and move the existing nestable annotation to it along with
- * the new one. If neither annotation exists, then create a new nestable
- * annotation.
- */
- NestableAnnotation addAnnotation(int index, String nestableAnnotationName, String containerAnnotationName);
-
- /**
- * Move the nestable annotation found in the specified container
- * annotation at the specified source index to the specified target index.
- */
- void moveAnnotation(int targetIndex, int sourceIndex, String containerAnnotationName);
-
- /**
- * Remove the specified annotation.
- */
- void removeAnnotation(String annotationName);
-
- /**
- * Remove the specified nestable annotation from the container annotation at the specified
- * index.
- * If there is no container, assume the index is zero and this does the same as
- * {@link #removeAnnotation(String)}
- */
- void removeAnnotation(int index, String nestableAnnotationName, String containerAnnotationName);
-
- /**
* Sets the specified primary annotation as the first annotation, and removes all known
* annotations (i.e. does not remove non-persistence annotations) which are not included
* in the supporting annotations.
*/
Annotation setPrimaryAnnotation(String primaryAnnotationName, Iterable<String> supportingAnnotationNames);
-
-
+
+
// ********** queries **********
/**
@@ -133,25 +51,14 @@ public interface JavaResourcePersistentMember
*/
boolean isFinal();
String FINAL_PROPERTY = "final"; //$NON-NLS-1$
-
- /**
- * Return whether the underlying JDT member is currently annotated with any recognized
- * annotations.
- */
- boolean isAnnotated();
/**
* Return whether the Java resource persistent member is for the specified
* member.
*/
boolean isFor(String memberName, int occurrence);
-
- /**
- * Return the text range for the member's name.
- */
- TextRange getNameTextRange(CompilationUnit astRoot);
-
-
+
+
// ********** behavior **********
/**
@@ -159,4 +66,5 @@ public interface JavaResourcePersistentMember
* in the workspace.
*/
void resolveTypes(CompilationUnit astRoot);
+
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/AnnotatedElement.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/AnnotatedElement.java
new file mode 100644
index 0000000000..2dd3d87b00
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/AnnotatedElement.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oracle. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0, which accompanies this distribution
+ * and is available at http://www.eclipse.org/legal/epl-v10.html.
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.jpt.core.utility.jdt;
+
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.IBinding;
+import org.eclipse.jpt.core.utility.TextRange;
+
+/**
+ * Dali manipulates annotations on elements (packages, types, fields, and methods).
+ * This interface simplifies those manipulations.
+ *
+ * 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.
+ *
+ * This interface is not intended to be implemented by clients.
+ */
+public interface AnnotatedElement {
+
+ /**
+ * Return the annotated element's body declaration from the specified AST.
+ * This can be null if the annotated element is no longer present in the AST
+ * because the source has been changed in another thread.
+ */
+ ASTNode getBodyDeclaration(CompilationUnit astRoot);
+
+ /**
+ * Return the annotated element's binding from the specified AST.
+ */
+ IBinding getBinding(CompilationUnit astRoot);
+
+ /**
+ * Return the annotated element's "modified" declaration from the specified AST.
+ */
+ ModifiedDeclaration getModifiedDeclaration(CompilationUnit astRoot);
+
+ /**
+ * Return the annotated element's "modified" declaration from a newly-generated AST.
+ */
+ ModifiedDeclaration getModifiedDeclaration();
+
+ /**
+ * Return the annotated element's name text range from the specified AST.
+ */
+ TextRange getNameTextRange(CompilationUnit astRoot);
+
+ /**
+ * Edit the annotated element's declaration using the specified editor.
+ */
+ void edit(Editor editor);
+
+
+ // ********** "editor" interface **********
+
+ /**
+ * This interface defines a callback that is invoked when the annotated element's
+ * compilation unit/AST is in a state to be manipulated.
+ */
+ public interface Editor {
+
+ /**
+ * Edit the specified declaration. Any changes made to the declaration
+ * will be captured and applied to the annotated element's compilation unit.
+ */
+ void edit(ModifiedDeclaration declaration);
+
+ }
+
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/Member.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/Member.java
index d36bbf6862..78b1443051 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/Member.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/utility/jdt/Member.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008 Oracle. All rights reserved.
+ * Copyright (c) 2008, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -9,10 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.core.utility.jdt;
-import org.eclipse.jdt.core.dom.BodyDeclaration;
import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.IBinding;
-import org.eclipse.jpt.core.utility.TextRange;
/**
* Dali manipulates annotations on members (types, fields, and methods).
@@ -26,29 +23,7 @@ import org.eclipse.jpt.core.utility.TextRange;
*
* This interface is not intended to be implemented by clients.
*/
-public interface Member {
-
- /**
- * Return the member's body declaration from the specified AST.
- * This can be null if the member is no longer present in the AST
- * because the source has been changed in another thread.
- */
- BodyDeclaration getBodyDeclaration(CompilationUnit astRoot);
-
- /**
- * Return the member's binding from the specified AST.
- */
- IBinding getBinding(CompilationUnit astRoot);
-
- /**
- * Return the member's "modified" declaration from the specified AST.
- */
- ModifiedDeclaration getModifiedDeclaration(CompilationUnit astRoot);
-
- /**
- * Return the member's "modified" declaration from a newly-generated AST.
- */
- ModifiedDeclaration getModifiedDeclaration();
+public interface Member extends AnnotatedElement {
/**
* Return whether the attribute is a persistable field or property getter.
@@ -61,31 +36,4 @@ public interface Member {
*/
boolean matches(String memberName, int occurrence);
- /**
- * Return the member's name text range from the specified AST.
- */
- TextRange getNameTextRange(CompilationUnit astRoot);
-
- /**
- * Edit the member's declaration using the specified editor.
- */
- void edit(Editor editor);
-
-
- // ********** "editor" interface **********
-
- /**
- * This interface defines a callback that is invoked when the member's
- * compilation unit/AST is in a state to be manipulated.
- */
- public interface Editor {
-
- /**
- * Edit the specified declaration. Any changes made to the declaration
- * will be captured and applied to the member's compilation unit.
- */
- void edit(ModifiedDeclaration declaration);
-
- }
-
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkBasicCollectionAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkBasicCollectionAnnotationDefinition.java
index 114103cc1c..278734ed97 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkBasicCollectionAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkBasicCollectionAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,10 +12,10 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkBasicCollectionAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkBasicCollectionAnnotation;
import org.eclipse.jpt.eclipselink.core.resource.java.EclipseLinkBasicCollectionAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkBasicCollectionAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkBasicCollectionAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkBasicCollectionAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkBasicCollectionAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkBasicMapAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkBasicMapAnnotationDefinition.java
index 6cb395f51a..978b66e829 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkBasicMapAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkBasicMapAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,10 +12,10 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkBasicMapAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkBasicMapAnnotation;
import org.eclipse.jpt.eclipselink.core.resource.java.EclipseLinkBasicMapAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkBasicMapAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkBasicMapAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkBasicMapAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkBasicMapAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkCacheAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkCacheAnnotationDefinition.java
index a978013270..6b45e7d1bf 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkCacheAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkCacheAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,9 +12,9 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkCacheAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkCacheAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkCacheAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkCacheAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkCacheAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullEclipseLinkCacheAnnotation((JavaResourcePersistentType) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkCacheAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkChangeTrackingAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkChangeTrackingAnnotationDefinition.java
index 4e12074f45..c6a6ac4b44 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkChangeTrackingAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkChangeTrackingAnnotationDefinition.java
@@ -12,9 +12,9 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkChangeTrackingAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkChangeTrackingAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkChangeTrackingAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkChangeTrackingAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkChangeTrackingAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkChangeTrackingAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkConvertAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkConvertAnnotationDefinition.java
index 76a469bf9e..56909087cd 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkConvertAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkConvertAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,10 +12,10 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkConvertAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkConvertAnnotation;
import org.eclipse.jpt.eclipselink.core.resource.java.EclipseLinkConvertAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkConvertAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkConvertAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkConvertAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkConvertAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkConverterAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkConverterAnnotationDefinition.java
index 6ef7e4bd31..349daddad3 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkConverterAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkConverterAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,7 +12,9 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkConverterAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkConverterAnnotation;
@@ -41,16 +43,16 @@ public class EclipseLinkConverterAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkConverterAnnotation(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkConverterAnnotation((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
- return new BinaryEclipseLinkConverterAnnotation(parent, jdtAnnotation);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
+ return new BinaryEclipseLinkConverterAnnotation((JavaResourcePersistentMember) parent, jdtAnnotation);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkCustomizerAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkCustomizerAnnotationDefinition.java
index bd4cb337f6..251caf5f03 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkCustomizerAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkCustomizerAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,9 +12,9 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkCustomizerAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkCustomizerAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkCustomizerAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkCustomizerAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkCustomizerAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkCustomizerAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkExistenceCheckingAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkExistenceCheckingAnnotationDefinition.java
index 2fd4a71e5a..4127c179bd 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkExistenceCheckingAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkExistenceCheckingAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,9 +12,9 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkExistenceCheckingAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkExistenceCheckingAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkExistenceCheckingAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkExistenceCheckingAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkExistenceCheckingAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkExistenceCheckingAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkJoinFetchAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkJoinFetchAnnotationDefinition.java
index e74ae64cb2..a517dd95f3 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkJoinFetchAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkJoinFetchAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,10 +12,10 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkJoinFetchAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkJoinFetchAnnotation;
import org.eclipse.jpt.eclipselink.core.resource.java.EclipseLinkJoinFetchAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkJoinFetchAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkJoinFetchAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkJoinFetchAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullEclipseLinkJoinFetchAnnotation((JavaResourcePersistentAttribute) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkJoinFetchAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkMutableAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkMutableAnnotationDefinition.java
index 8b69fbd85f..3c4fcfd398 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkMutableAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkMutableAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,10 +12,10 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkMutableAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkMutableAnnotation;
import org.eclipse.jpt.eclipselink.core.resource.java.EclipseLinkMutableAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkMutableAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkMutableAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkMutableAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkMutableAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkObjectTypeConverterAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkObjectTypeConverterAnnotationDefinition.java
index d808dcac6f..54439c96db 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkObjectTypeConverterAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkObjectTypeConverterAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,7 +12,9 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkObjectTypeConverterAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkObjectTypeConverterAnnotation;
@@ -41,16 +43,16 @@ public class EclipseLinkObjectTypeConverterAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkObjectTypeConverterAnnotation(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkObjectTypeConverterAnnotation((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
- return new BinaryEclipseLinkObjectTypeConverterAnnotation(parent, jdtAnnotation);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
+ return new BinaryEclipseLinkObjectTypeConverterAnnotation((JavaResourcePersistentMember) parent, jdtAnnotation);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkPrimaryKeyAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkPrimaryKeyAnnotationDefinition.java
index bfdd0d997b..6d09e0a4a4 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkPrimaryKeyAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkPrimaryKeyAnnotationDefinition.java
@@ -13,9 +13,9 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkPrimaryKeyAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkPrimaryKeyAnnotation;
@@ -45,15 +45,15 @@ public class EclipseLinkPrimaryKeyAnnotationDefinition
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkPrimaryKeyAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkPrimaryKeyAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkPrimaryKeyAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkPrivateOwnedAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkPrivateOwnedAnnotationDefinition.java
index 44b4e06bfe..b04a85445c 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkPrivateOwnedAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkPrivateOwnedAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,10 +12,10 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkPrivateOwnedAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkPrivateOwnedAnnotation;
import org.eclipse.jpt.eclipselink.core.resource.java.EclipseLinkPrivateOwnedAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkPrivateOwnedAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkPrivateOwnedAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkPrivateOwnedAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkPrivateOwnedAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkReadOnlyAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkReadOnlyAnnotationDefinition.java
index eae819a55f..0d720d3d57 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkReadOnlyAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkReadOnlyAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,9 +12,9 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkReadOnlyAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkReadOnlyAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkReadOnlyAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkReadOnlyAnnotation((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkReadOnlyAnnotation((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkReadOnlyAnnotation((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkReadTransformerAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkReadTransformerAnnotationDefinition.java
index 2edc4ed3ef..69a35494d0 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkReadTransformerAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkReadTransformerAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,10 +12,10 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkReadTransformerAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkReadTransformerAnnotation;
import org.eclipse.jpt.eclipselink.core.resource.java.EclipseLinkReadTransformerAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkReadTransformerAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkReadTransformerAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkReadTransformerAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkReadTransformerAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkStructConverterAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkStructConverterAnnotationDefinition.java
index a370f1e634..fecb61fc34 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkStructConverterAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkStructConverterAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,7 +12,9 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkStructConverterAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkStructConverterAnnotation;
@@ -41,16 +43,16 @@ public class EclipseLinkStructConverterAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkStructConverterAnnotation(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkStructConverterAnnotation((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
- return new BinaryEclipseLinkStructConverterAnnotation(parent, jdtAnnotation);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
+ return new BinaryEclipseLinkStructConverterAnnotation((JavaResourcePersistentMember) parent, jdtAnnotation);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkTransformationAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkTransformationAnnotationDefinition.java
index 1908362bcd..6c4001b6d4 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkTransformationAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkTransformationAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,10 +12,10 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkTransformationAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkTransformationAnnotation;
import org.eclipse.jpt.eclipselink.core.resource.java.EclipseLinkTransformationAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkTransformationAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkTransformationAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkTransformationAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullEclipseLinkTransformationAnnotation((JavaResourcePersistentAttribute) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkTransformationAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkTypeConverterAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkTypeConverterAnnotationDefinition.java
index 275528e984..37ec6f8204 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkTypeConverterAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkTypeConverterAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,7 +12,9 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkTypeConverterAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkTypeConverterAnnotation;
@@ -41,16 +43,16 @@ public class EclipseLinkTypeConverterAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkTypeConverterAnnotation(parent, member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkTypeConverterAnnotation((JavaResourcePersistentMember) parent, (Member) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
- return new BinaryEclipseLinkTypeConverterAnnotation(parent, jdtAnnotation);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
+ return new BinaryEclipseLinkTypeConverterAnnotation((JavaResourcePersistentMember) parent, jdtAnnotation);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkVariableOneToOneAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkVariableOneToOneAnnotationDefinition.java
index fea99e00e8..9e38385e3f 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkVariableOneToOneAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkVariableOneToOneAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,10 +12,10 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkVariableOneToOneAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkVariableOneToOneAnnotation;
import org.eclipse.jpt.eclipselink.core.resource.java.EclipseLinkVariableOneToOneAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkVariableOneToOneAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkVariableOneToOneAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkVariableOneToOneAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
return new NullEclipseLinkVariableOneToOneAnnotation((JavaResourcePersistentAttribute) parent);
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkVariableOneToOneAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkWriteTransformerAnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkWriteTransformerAnnotationDefinition.java
index 5993a8fe13..3411a62c6f 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkWriteTransformerAnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/EclipseLinkWriteTransformerAnnotationDefinition.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle. All rights reserved.
+ * Copyright (c) 2009, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -12,10 +12,10 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Attribute;
-import org.eclipse.jpt.core.utility.jdt.Member;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.binary.BinaryEclipseLinkWriteTransformerAnnotation;
import org.eclipse.jpt.eclipselink.core.internal.resource.java.source.SourceEclipseLinkWriteTransformerAnnotation;
import org.eclipse.jpt.eclipselink.core.resource.java.EclipseLinkWriteTransformerAnnotation;
@@ -43,15 +43,15 @@ public class EclipseLinkWriteTransformerAnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkWriteTransformerAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkWriteTransformerAnnotation((JavaResourcePersistentAttribute) parent, (Attribute) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkWriteTransformerAnnotation((JavaResourcePersistentAttribute) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceBaseEclipseLinkTypeConverterAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceBaseEclipseLinkTypeConverterAnnotation.java
index ba702eb069..6af55d0f9c 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceBaseEclipseLinkTypeConverterAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceBaseEclipseLinkTypeConverterAnnotation.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.TypeStringExpressionConverter;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
import org.eclipse.jpt.core.utility.TextRange;
@@ -43,10 +43,10 @@ abstract class SourceBaseEclipseLinkTypeConverterAnnotation
SourceBaseEclipseLinkTypeConverterAnnotation(JavaResourcePersistentMember parent, Member member, DeclarationAnnotationAdapter daa) {
super(parent, member, daa);
this.dataTypeDeclarationAdapter = this.buildTypeAdapter(this.getDataTypeElementName());
- this.dataTypeAdapter = new MemberAnnotationElementAdapter<String>(this.member, this.dataTypeDeclarationAdapter);
+ this.dataTypeAdapter = new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, this.dataTypeDeclarationAdapter);
this.objectTypeDeclarationAdapter = this.buildTypeAdapter(this.getObjectTypeElementName());
- this.objectTypeAdapter = new MemberAnnotationElementAdapter<String>(this.member, this.objectTypeDeclarationAdapter);
+ this.objectTypeAdapter = new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, this.objectTypeDeclarationAdapter);
}
private DeclarationAnnotationElementAdapter<String> buildTypeAdapter(String elementName) {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCacheAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCacheAnnotation.java
index 1e553f4b02..5db0796f33 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCacheAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCacheAnnotation.java
@@ -14,8 +14,8 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.BooleanExpressionConverter;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NumberIntegerExpressionConverter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
@@ -73,21 +73,21 @@ public final class SourceEclipseLinkCacheAnnotation
private Boolean disableHits;
private static final NestedDeclarationAnnotationAdapter EXPIRY_TIME_OF_DAY_ADAPTER = buildExpiryTimeOfDayAdapter();
- private final MemberAnnotationAdapter expiryTimeOfDayAdapter;
+ private final ElementAnnotationAdapter expiryTimeOfDayAdapter;
private CacheCoordinationType coordinationType;
public SourceEclipseLinkCacheAnnotation(JavaResourcePersistentType parent, Type type) {
super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
- this.typeAdapter = new MemberAnnotationElementAdapter<String>(type, TYPE_ADAPTER);
- this.sizeAdapter = new MemberAnnotationElementAdapter<Integer>(type, SIZE_ADAPTER);
- this.sharedAdapter = new MemberAnnotationElementAdapter<Boolean>(type, SHARED_ADAPTER);
- this.expiryAdapter = new MemberAnnotationElementAdapter<Integer>(type, EXPIRY_ADAPTER);
- this.alwaysRefreshAdapter = new MemberAnnotationElementAdapter<Boolean>(type, ALWAYS_REFRESH_ADAPTER);
- this.refreshOnlyIfNewerAdapter = new MemberAnnotationElementAdapter<Boolean>(type, REFRESH_ONLY_IF_NEWER_ADAPTER);
- this.disableHitsAdapter = new MemberAnnotationElementAdapter<Boolean>(type, DISABLE_HITS_ADAPTER);
- this.coordinationTypeAdapter = new MemberAnnotationElementAdapter<String>(type, COORDINATION_TYPE_ADAPTER);
- this.expiryTimeOfDayAdapter = new MemberAnnotationAdapter(type, EXPIRY_TIME_OF_DAY_ADAPTER);
+ this.typeAdapter = new AnnotatedElementAnnotationElementAdapter<String>(type, TYPE_ADAPTER);
+ this.sizeAdapter = new AnnotatedElementAnnotationElementAdapter<Integer>(type, SIZE_ADAPTER);
+ this.sharedAdapter = new AnnotatedElementAnnotationElementAdapter<Boolean>(type, SHARED_ADAPTER);
+ this.expiryAdapter = new AnnotatedElementAnnotationElementAdapter<Integer>(type, EXPIRY_ADAPTER);
+ this.alwaysRefreshAdapter = new AnnotatedElementAnnotationElementAdapter<Boolean>(type, ALWAYS_REFRESH_ADAPTER);
+ this.refreshOnlyIfNewerAdapter = new AnnotatedElementAnnotationElementAdapter<Boolean>(type, REFRESH_ONLY_IF_NEWER_ADAPTER);
+ this.disableHitsAdapter = new AnnotatedElementAnnotationElementAdapter<Boolean>(type, DISABLE_HITS_ADAPTER);
+ this.coordinationTypeAdapter = new AnnotatedElementAnnotationElementAdapter<String>(type, COORDINATION_TYPE_ADAPTER);
+ this.expiryTimeOfDayAdapter = new ElementAnnotationAdapter(type, EXPIRY_TIME_OF_DAY_ADAPTER);
}
public String getAnnotationName() {
@@ -260,7 +260,7 @@ public final class SourceEclipseLinkCacheAnnotation
}
private EclipseLinkTimeOfDayAnnotation buildExpiryTimeOfDay() {
- return new SourceEclipseLinkTimeOfDayAnnotation(this, this.member, EXPIRY_TIME_OF_DAY_ADAPTER);
+ return new SourceEclipseLinkTimeOfDayAnnotation(this, this.annotatedElement, EXPIRY_TIME_OF_DAY_ADAPTER);
}
private void syncExpiryTimeOfDay(CompilationUnit astRoot) {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkChangeTrackingAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkChangeTrackingAnnotation.java
index 575ed10b48..47468530c1 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkChangeTrackingAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkChangeTrackingAnnotation.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
import org.eclipse.jpt.core.utility.TextRange;
@@ -40,7 +40,7 @@ public final class SourceEclipseLinkChangeTrackingAnnotation
public SourceEclipseLinkChangeTrackingAnnotation(JavaResourcePersistentType parent, Type type) {
super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConversionValueAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConversionValueAnnotation.java
index f1b803486a..00b4cd4aad 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConversionValueAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConversionValueAnnotation.java
@@ -12,8 +12,8 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.core.utility.TextRange;
@@ -45,7 +45,7 @@ final class SourceEclipseLinkConversionValueAnnotation
SourceEclipseLinkConversionValueAnnotation(EclipseLinkObjectTypeConverterAnnotation parent, Member member, IndexedDeclarationAnnotationAdapter idaa) {
- super(parent, member, idaa, new MemberIndexedAnnotationAdapter(member, idaa));
+ super(parent, member, idaa, new ElementIndexedAnnotationAdapter(member, idaa));
this.dataValueDeclarationAdapter = this.buildDataValueAdapter(idaa);
this.dataValueAdapter = this.buildAdapter(this.dataValueDeclarationAdapter);
this.objectValueDeclarationAdapter = this.buildObjectValueAdapter(idaa);
@@ -53,7 +53,7 @@ final class SourceEclipseLinkConversionValueAnnotation
}
private AnnotationElementAdapter<String> buildAdapter(DeclarationAnnotationElementAdapter<String> daea) {
- return new MemberAnnotationElementAdapter<String>(this.member, daea);
+ return new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, daea);
}
private DeclarationAnnotationElementAdapter<String> buildDataValueAdapter(DeclarationAnnotationAdapter declarationAnnotationAdapter) {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConvertAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConvertAnnotation.java
index 68deb5fe47..7f73314fea 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConvertAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConvertAnnotation.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.StringExpressionConverter;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
@@ -40,7 +40,7 @@ public final class SourceEclipseLinkConvertAnnotation
public SourceEclipseLinkConvertAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(attribute, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, VALUE_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConverterAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConverterAnnotation.java
index 31ec25a7f3..eca223d0f6 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConverterAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkConverterAnnotation.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
@@ -41,7 +41,7 @@ public final class SourceEclipseLinkConverterAnnotation
public SourceEclipseLinkConverterAnnotation(JavaResourcePersistentMember parent, Member member) {
super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
- this.converterClassAdapter = new MemberAnnotationElementAdapter<String>(member, CONVERTER_CLASS_ADAPTER);
+ this.converterClassAdapter = new AnnotatedElementAnnotationElementAdapter<String>(member, CONVERTER_CLASS_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCustomizerAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCustomizerAnnotation.java
index 43f3486df2..76d2871eb3 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCustomizerAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkCustomizerAnnotation.java
@@ -13,7 +13,7 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
@@ -42,7 +42,7 @@ public final class SourceEclipseLinkCustomizerAnnotation
public SourceEclipseLinkCustomizerAnnotation(JavaResourcePersistentType parent, Type type) {
super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkExistenceCheckingAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkExistenceCheckingAnnotation.java
index bae9012793..b661f44445 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkExistenceCheckingAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkExistenceCheckingAnnotation.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
import org.eclipse.jpt.core.utility.TextRange;
@@ -40,7 +40,7 @@ public final class SourceEclipseLinkExistenceCheckingAnnotation
public SourceEclipseLinkExistenceCheckingAnnotation(JavaResourcePersistentType parent, Type type) {
super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkJoinFetchAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkJoinFetchAnnotation.java
index 604a9af93b..8bcb78c44a 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkJoinFetchAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkJoinFetchAnnotation.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
import org.eclipse.jpt.core.utility.TextRange;
@@ -40,7 +40,7 @@ public final class SourceEclipseLinkJoinFetchAnnotation
public SourceEclipseLinkJoinFetchAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(attribute, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, VALUE_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkMutableAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkMutableAnnotation.java
index 62832e81ee..38cea92763 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkMutableAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkMutableAnnotation.java
@@ -13,7 +13,7 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.BooleanExpressionConverter;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
import org.eclipse.jpt.core.utility.TextRange;
@@ -40,7 +40,7 @@ public final class SourceEclipseLinkMutableAnnotation
public SourceEclipseLinkMutableAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<Boolean>(attribute, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<Boolean>(attribute, VALUE_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkNamedConverterAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkNamedConverterAnnotation.java
index 244d24f4b5..8964f68829 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkNamedConverterAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkNamedConverterAnnotation.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
import org.eclipse.jpt.core.resource.java.OverrideAnnotation;
import org.eclipse.jpt.core.utility.TextRange;
@@ -42,7 +42,7 @@ abstract class SourceEclipseLinkNamedConverterAnnotation
SourceEclipseLinkNamedConverterAnnotation(JavaResourceNode parent, Member member, DeclarationAnnotationAdapter daa) {
super(parent, member, daa);
this.nameDeclarationAdapter = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, this.getNameElementName(), false); // false = do not remove annotation when empty
- this.nameAdapter = new MemberAnnotationElementAdapter<String>(this.member, this.nameDeclarationAdapter);
+ this.nameAdapter = new AnnotatedElementAnnotationElementAdapter<String>(this.annotatedElement, this.nameDeclarationAdapter);
}
public void initialize(CompilationUnit astRoot) {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkObjectTypeConverterAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkObjectTypeConverterAnnotation.java
index f89b76434e..4b58d64af5 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkObjectTypeConverterAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkObjectTypeConverterAnnotation.java
@@ -16,7 +16,7 @@ import org.eclipse.jdt.core.dom.Annotation;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.AnnotationContainerTools;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.StringExpressionConverter;
import org.eclipse.jpt.core.resource.java.AnnotationContainer;
@@ -54,7 +54,7 @@ public final class SourceEclipseLinkObjectTypeConverterAnnotation
public SourceEclipseLinkObjectTypeConverterAnnotation(JavaResourcePersistentMember parent, Member member) {
super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
- this.defaultObjectValueAdapter = new MemberAnnotationElementAdapter<String>(member, DEFAULT_OBJECT_VALUE_ADAPTER);
+ this.defaultObjectValueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(member, DEFAULT_OBJECT_VALUE_ADAPTER);
}
public String getAnnotationName() {
@@ -168,7 +168,7 @@ public final class SourceEclipseLinkObjectTypeConverterAnnotation
}
private NestableEclipseLinkConversionValueAnnotation buildConversionValue(int index) {
- return SourceEclipseLinkConversionValueAnnotation.createConversionValue(this, this.member, this.daa, index);
+ return SourceEclipseLinkConversionValueAnnotation.createConversionValue(this, this.annotatedElement, this.daa, index);
}
void conversionValueAdded(int index, NestableEclipseLinkConversionValueAnnotation conversionValue) {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkStructConverterAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkStructConverterAnnotation.java
index f2fabfae0e..c198e8bc51 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkStructConverterAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkStructConverterAnnotation.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.StringExpressionConverter;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
@@ -39,7 +39,7 @@ public final class SourceEclipseLinkStructConverterAnnotation
public SourceEclipseLinkStructConverterAnnotation(JavaResourcePersistentMember parent, Member member) {
super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
- this.converterAdapter = new MemberAnnotationElementAdapter<String>(member, CONVERTER_ADAPTER);
+ this.converterAdapter = new AnnotatedElementAnnotationElementAdapter<String>(member, CONVERTER_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTimeOfDayAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTimeOfDayAnnotation.java
index d9a563b267..826ead7cf4 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTimeOfDayAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTimeOfDayAnnotation.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NumberIntegerExpressionConverter;
import org.eclipse.jpt.core.resource.java.JavaResourceNode;
import org.eclipse.jpt.core.utility.TextRange;
@@ -50,13 +50,13 @@ public final class SourceEclipseLinkTimeOfDayAnnotation
public SourceEclipseLinkTimeOfDayAnnotation(JavaResourceNode parent, Type type, DeclarationAnnotationAdapter daa) {
super(parent, type, daa);
this.hourDeclarationAdapter = buildHourAdapter(daa);
- this.hourAdapter = new MemberAnnotationElementAdapter<Integer>(type, this.hourDeclarationAdapter);
+ this.hourAdapter = new AnnotatedElementAnnotationElementAdapter<Integer>(type, this.hourDeclarationAdapter);
this.minuteDeclarationAdapter = buildMinuteAdapter(daa);
- this.minuteAdapter = new MemberAnnotationElementAdapter<Integer>(type, this.minuteDeclarationAdapter);
+ this.minuteAdapter = new AnnotatedElementAnnotationElementAdapter<Integer>(type, this.minuteDeclarationAdapter);
this.secondDeclarationAdapter = buildSecondAdapter(daa);
- this.secondAdapter = new MemberAnnotationElementAdapter<Integer>(type, this.secondDeclarationAdapter);
+ this.secondAdapter = new AnnotatedElementAnnotationElementAdapter<Integer>(type, this.secondDeclarationAdapter);
this.millisecondDeclarationAdapter = buildMillisecondAdapter(daa);
- this.millisecondAdapter = new MemberAnnotationElementAdapter<Integer>(type, this.millisecondDeclarationAdapter);
+ this.millisecondAdapter = new AnnotatedElementAnnotationElementAdapter<Integer>(type, this.millisecondDeclarationAdapter);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTransformationAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTransformationAnnotation.java
index 2927b6f3db..ecd79f48ea 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTransformationAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTransformationAnnotation.java
@@ -14,7 +14,7 @@ import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.BooleanExpressionConverter;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.FetchType;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
@@ -46,8 +46,8 @@ public final class SourceEclipseLinkTransformationAnnotation
public SourceEclipseLinkTransformationAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
- this.fetchAdapter = new MemberAnnotationElementAdapter<String>(attribute, FETCH_ADAPTER);
- this.optionalAdapter = new MemberAnnotationElementAdapter<Boolean>(attribute, OPTIONAL_ADAPTER);
+ this.fetchAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, FETCH_ADAPTER);
+ this.optionalAdapter = new AnnotatedElementAnnotationElementAdapter<Boolean>(attribute, OPTIONAL_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTransformerAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTransformerAnnotation.java
index e50c25eb6c..bfeab7e346 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTransformerAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkTransformerAnnotation.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentAttribute;
import org.eclipse.jpt.core.utility.TextRange;
@@ -42,10 +42,10 @@ abstract class SourceEclipseLinkTransformerAnnotation
SourceEclipseLinkTransformerAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute, DeclarationAnnotationAdapter daa) {
super(parent, attribute, daa);
this.transformerClassDeclarationAdapter = new ConversionDeclarationAnnotationElementAdapter<String>(daa, this.getTransformerClassElementName(), false, SimpleTypeStringExpressionConverter.instance());
- this.transformerClassAdapter = new MemberAnnotationElementAdapter<String>(attribute, this.transformerClassDeclarationAdapter);
+ this.transformerClassAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, this.transformerClassDeclarationAdapter);
this.methodDeclarationAdapter = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, this.getMethodElementName(), false);
- this.methodAdapter = new MemberAnnotationElementAdapter<String>(attribute, this.methodDeclarationAdapter);
+ this.methodAdapter = new AnnotatedElementAnnotationElementAdapter<String>(attribute, this.methodDeclarationAdapter);
}
public void initialize(CompilationUnit astRoot) {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkWriteTransformerAnnotation.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkWriteTransformerAnnotation.java
index cc71ce6b66..1f2c52d452 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkWriteTransformerAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/resource/java/source/SourceEclipseLinkWriteTransformerAnnotation.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.eclipselink.core.internal.resource.java.source;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceColumnAnnotation;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.resource.java.ColumnAnnotation;
@@ -35,13 +35,13 @@ public final class SourceEclipseLinkWriteTransformerAnnotation
{
private static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
- private final MemberAnnotationAdapter columnAdapter;
+ private final ElementAnnotationAdapter columnAdapter;
private ColumnAnnotation column;
public SourceEclipseLinkWriteTransformerAnnotation(JavaResourcePersistentAttribute parent, Attribute attribute) {
super(parent, attribute, DECLARATION_ANNOTATION_ADAPTER);
- this.columnAdapter = new MemberAnnotationAdapter(this.member, buildColumnAnnotationAdapter(this.daa));
+ this.columnAdapter = new ElementAnnotationAdapter(this.annotatedElement, buildColumnAnnotationAdapter(this.daa));
}
public String getAnnotationName() {
@@ -52,7 +52,7 @@ public final class SourceEclipseLinkWriteTransformerAnnotation
public void initialize(CompilationUnit astRoot) {
super.initialize(astRoot);
if (this.columnAdapter.getAnnotation(astRoot) != null) {
- this.column = createColumn(this, this.member, this.daa);
+ this.column = createColumn(this, this.annotatedElement, this.daa);
this.column.initialize(astRoot);
}
}
@@ -92,7 +92,7 @@ public final class SourceEclipseLinkWriteTransformerAnnotation
if (this.column != null) {
throw new IllegalStateException("'column' element already exists: " + this.column); //$NON-NLS-1$
}
- this.column = createColumn(this, this.member, this.daa);
+ this.column = createColumn(this, this.annotatedElement, this.daa);
this.column.newAnnotation();
return this.column;
}
@@ -110,7 +110,7 @@ public final class SourceEclipseLinkWriteTransformerAnnotation
this.syncColumn_(null);
} else {
if (this.column == null) {
- ColumnAnnotation col = createColumn(this, this.member, this.daa);
+ ColumnAnnotation col = createColumn(this, this.annotatedElement, this.daa);
col.initialize(astRoot);
this.syncColumn_(col);
} else {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v2_1/resource/java/EclipseLinkClassExtractor2_1AnnotationDefinition.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v2_1/resource/java/EclipseLinkClassExtractor2_1AnnotationDefinition.java
index 8791add2f8..9ad9d0368a 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v2_1/resource/java/EclipseLinkClassExtractor2_1AnnotationDefinition.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v2_1/resource/java/EclipseLinkClassExtractor2_1AnnotationDefinition.java
@@ -12,9 +12,9 @@ package org.eclipse.jpt.eclipselink.core.internal.v2_1.resource.java;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jpt.core.resource.java.Annotation;
import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
-import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.resource.java.JavaResourceAnnotatedElement;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
-import org.eclipse.jpt.core.utility.jdt.Member;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.core.utility.jdt.Type;
import org.eclipse.jpt.eclipselink.core.internal.v2_1.resource.java.binary.BinaryEclipseLinkClassExtractorAnnotation2_1;
import org.eclipse.jpt.eclipselink.core.internal.v2_1.resource.java.source.SourceEclipseLinkClassExtractorAnnotation2_1;
@@ -43,15 +43,15 @@ public class EclipseLinkClassExtractor2_1AnnotationDefinition
super();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member member) {
- return new SourceEclipseLinkClassExtractorAnnotation2_1((JavaResourcePersistentType) parent, (Type) member);
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
+ return new SourceEclipseLinkClassExtractorAnnotation2_1((JavaResourcePersistentType) parent, (Type) annotatedElement);
}
- public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
throw new UnsupportedOperationException();
}
- public Annotation buildAnnotation(JavaResourcePersistentMember parent, IAnnotation jdtAnnotation) {
+ public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, IAnnotation jdtAnnotation) {
return new BinaryEclipseLinkClassExtractorAnnotation2_1((JavaResourcePersistentType) parent, jdtAnnotation);
}
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v2_1/resource/java/source/SourceEclipseLinkClassExtractorAnnotation2_1.java b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v2_1/resource/java/source/SourceEclipseLinkClassExtractorAnnotation2_1.java
index 597d14f88f..266ff1a6e8 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v2_1/resource/java/source/SourceEclipseLinkClassExtractorAnnotation2_1.java
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.core/src/org/eclipse/jpt/eclipselink/core/internal/v2_1/resource/java/source/SourceEclipseLinkClassExtractorAnnotation2_1.java
@@ -13,7 +13,7 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.ASTTools;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.SimpleTypeStringExpressionConverter;
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
@@ -44,7 +44,7 @@ public final class SourceEclipseLinkClassExtractorAnnotation2_1
public SourceEclipseLinkClassExtractorAnnotation2_1(JavaResourcePersistentType parent, Type type) {
super(parent, type, DECLARATION_ANNOTATION_ADAPTER);
- this.valueAdapter = new MemberAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
+ this.valueAdapter = new AnnotatedElementAnnotationElementAdapter<String>(type, VALUE_ADAPTER);
}
public String getAnnotationName() {
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/java/JavaResourcePersistentAttributeTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/java/JavaResourcePersistentAttributeTests.java
index 9c7cc16d0a..024a61cd9a 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/java/JavaResourcePersistentAttributeTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/java/JavaResourcePersistentAttributeTests.java
@@ -31,7 +31,7 @@ import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
import org.eclipse.jpt.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.core.resource.java.OneToManyAnnotation;
import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
-import org.eclipse.jpt.core.utility.jdt.Member.Editor;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement.Editor;
import org.eclipse.jpt.utility.internal.ReflectionTools;
import org.eclipse.jpt.utility.internal.CollectionTools;
import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/java/JavaResourcePersistentTypeTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/java/JavaResourcePersistentTypeTests.java
index a51ff80680..b39669d0ca 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/java/JavaResourcePersistentTypeTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/resource/java/JavaResourcePersistentTypeTests.java
@@ -27,7 +27,7 @@ import org.eclipse.jpt.core.resource.java.NestableAnnotation;
import org.eclipse.jpt.core.resource.java.SecondaryTableAnnotation;
import org.eclipse.jpt.core.resource.java.TableAnnotation;
import org.eclipse.jpt.core.utility.jdt.ModifiedDeclaration;
-import org.eclipse.jpt.core.utility.jdt.Member.Editor;
+import org.eclipse.jpt.core.utility.jdt.AnnotatedElement.Editor;
import org.eclipse.jpt.utility.internal.CollectionTools;
import org.eclipse.jpt.utility.internal.iterables.EmptyIterable;
import org.eclipse.jpt.utility.internal.iterators.ArrayIterator;
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/CombinationIndexedDeclarationAnnotationAdapterTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/CombinationIndexedDeclarationAnnotationAdapterTests.java
index feb41bd0f8..e2650de398 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/CombinationIndexedDeclarationAnnotationAdapterTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/CombinationIndexedDeclarationAnnotationAdapterTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -16,8 +16,8 @@ import org.eclipse.jdt.core.dom.MemberValuePair;
import org.eclipse.jdt.core.dom.NormalAnnotation;
import org.eclipse.jdt.core.dom.StringLiteral;
import org.eclipse.jpt.core.internal.utility.jdt.CombinationIndexedDeclarationAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberIndexedAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ElementIndexedAnnotationAdapter;
import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter;
import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
import org.eclipse.jpt.core.utility.jdt.IndexedAnnotationAdapter;
@@ -41,7 +41,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumn(name=\"ADDRESS_ID\")");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", 0);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
assertEquals("annot.JoinColumn", annotation.getTypeName().getFullyQualifiedName());
@@ -54,7 +54,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumn(name=\"ADDRESS_ID\")");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
}
@@ -65,7 +65,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns(@annot.JoinColumn(name=\"ADDRESS_ID\"))");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", 0);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
assertEquals("annot.JoinColumn", annotation.getTypeName().getFullyQualifiedName());
@@ -78,7 +78,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns(@annot.JoinColumn(name=\"ADDRESS_ID\"))");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
}
@@ -89,7 +89,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns({@annot.JoinColumn(name=\"ADDRESS_ID1\"), @annot.JoinColumn(name=\"ADDRESS_ID2\")})");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
assertEquals("annot.JoinColumn", annotation.getTypeName().getFullyQualifiedName());
@@ -104,7 +104,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns({@annot.JoinColumn(name=\"ADDRESS_ID1\"), @annot.JoinColumn(name=\"ADDRESS_ID2\")})");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
}
@@ -115,7 +115,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns(columns={@annot.JoinColumn(name=\"ADDRESS_ID1\"), @annot.JoinColumn(name=\"ADDRESS_ID2\")})");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
assertEquals("annot.JoinColumn", annotation.getTypeName().getFullyQualifiedName());
@@ -130,7 +130,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns(columns={@annot.JoinColumn(name=\"ADDRESS_ID1\"), @annot.JoinColumn(name=\"ADDRESS_ID2\")})");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
}
@@ -141,7 +141,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumn(name=\"ADDRESS_ID\")");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", 0);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
aa.removeAnnotation();
this.assertSourceDoesNotContain("JoinColumn", cu);
}
@@ -152,7 +152,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns(@annot.JoinColumn(name=\"ADDRESS_ID\"))");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", 0);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
aa.removeAnnotation();
this.assertSourceDoesNotContain("JoinColumns", cu);
this.assertSourceDoesNotContain("JoinColumn", cu);
@@ -164,7 +164,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns({@annot.JoinColumn(name=\"ADDRESS_ID1\"), @annot.JoinColumn(name=\"ADDRESS_ID2\")})");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
aa.removeAnnotation();
this.assertSourceDoesNotContain("JoinColumns", cu);
this.assertSourceDoesNotContain("ADDRESS_ID2", cu);
@@ -177,7 +177,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns(columns={@annot.JoinColumn(name=\"ADDRESS_ID1\"), @annot.JoinColumn(name=\"ADDRESS_ID2\")})");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
aa.removeAnnotation();
this.assertSourceDoesNotContain("JoinColumns", cu);
this.assertSourceDoesNotContain("ADDRESS_ID2", cu);
@@ -190,7 +190,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns(comment=\"test\",columns={@annot.JoinColumn(name=\"ADDRESS_ID1\"), @annot.JoinColumn(name=\"ADDRESS_ID2\")})");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
aa.removeAnnotation();
this.assertSourceContains("@annot.JoinColumns(comment=\"test\",columns=@annot.JoinColumn(name=\"ADDRESS_ID1\"))", cu);
}
@@ -201,7 +201,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns(null)");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", 0);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
aa.removeAnnotation();
this.assertSourceContains("@annot.JoinColumns(null)", cu);
}
@@ -213,7 +213,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
String expected = "@JoinColumn(name=\"ADDRESS_ID0\")";
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "value", 2);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -229,7 +229,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceContains("@annot.JoinColumn", cu);
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "value", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -244,7 +244,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
String expected = "@JoinColumn(name=\"ADDRESS_ID0\")";
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "value", 2);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -259,7 +259,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
String expected = "@annot.JoinColumns({@annot.JoinColumn(name=\"ADDRESS_ID0\"), null, null, @annot.JoinColumn(name=\"ADDRESS_ID3\")})";
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "value", 2);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -274,7 +274,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
String expected = "@annot.JoinColumns({@annot.JoinColumn(name=\"ADDRESS_ID0\"), null, @annot.JoinColumn(name=\"ADDRESS_ID2\")})";
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "value", 3);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -289,7 +289,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceContains("@annot.JoinColumn", cu);
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "value", 2);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -304,7 +304,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceDoesNotContain("JoinColumn", cu);
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 0);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
@@ -320,7 +320,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceDoesNotContain("JoinColumns", cu);
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
@@ -334,7 +334,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns(columns={@annot.JoinColumn, @annot.JoinColumn})");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 2);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
@@ -348,7 +348,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumn(77)");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 0);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -364,7 +364,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns(columns=@annot.JoinColumn(77))");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 0);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -379,7 +379,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns(columns=@annot.JoinColumn(77))");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
@@ -393,7 +393,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumn(77)");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
@@ -407,7 +407,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumns(columns={@annot.JoinColumn(77),@annot.JoinColumn(88)})");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -421,7 +421,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumn(text=\"blah\",num=42)");
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 1);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
@@ -439,7 +439,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceDoesNotContain(expected2, cu);
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 2);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
aa.newMarkerAnnotation();
this.assertSourceContains(expected1, cu);
this.assertSourceContains(expected2, cu);
@@ -468,7 +468,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceDoesNotContain(expected3, cu);
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "value", 2);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
aa.newMarkerAnnotation();
this.assertSourceContains(expected1, cu);
this.assertSourceContains(expected2, cu);
@@ -485,7 +485,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceDoesNotContain(expected2, cu);
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 4);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
aa.newMarkerAnnotation();
this.assertSourceContains(expected1, cu);
this.assertSourceContains(expected2, cu);
@@ -501,7 +501,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceDoesNotContain(expected2, cu);
DeclarationAnnotationAdapter daa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "value", 4);
- AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa);
+ AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa);
aa.newMarkerAnnotation();
this.assertSourceContains(expected1, cu);
this.assertSourceContains(expected2, cu);
@@ -515,7 +515,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceDoesNotContain(expected, cu);
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 0);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -530,7 +530,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
String expected = "@JoinColumn(name=\"ADDRESS_ID1\")";
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 1);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -546,7 +546,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
String expected = "@JoinColumn(name=\"ADDRESS_ID1\")";
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "value", 1);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -563,7 +563,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceDoesNotContain(expected, cu);
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 3);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -579,7 +579,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceDoesNotContain(expected, cu);
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 3);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -595,7 +595,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceDoesNotContain(expected, cu);
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 2);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -611,7 +611,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceDoesNotContain(expected, cu);
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 0);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -627,7 +627,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceDoesNotContain(expected, cu);
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 3);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
@@ -643,7 +643,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
this.assertSourceDoesNotContain(expected, cu);
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 3);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
@@ -658,7 +658,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType(expected); // the source should be unchanged
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 0);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
@@ -673,7 +673,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
String expected = "@JoinColumn(name=\"ADDRESS_ID0\")";
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 2);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
@@ -689,7 +689,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
String expected = "@JoinColumn(name=\"ADDRESS_ID0\")";
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "value", 2);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
@@ -704,7 +704,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
ICompilationUnit cu = this.createTestType("@annot.JoinColumn(name=\"ADDRESS_ID0\")");
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 1);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNull(annotation);
@@ -719,7 +719,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
String expected = "@JoinColumn(name=\"ADDRESS_ID2\")";
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 2);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
@@ -735,7 +735,7 @@ public class CombinationIndexedDeclarationAnnotationAdapterTests extends Annotat
String expected = "@annot.JoinColumns(columns={@annot.JoinColumn(name=\"ADDRESS_ID3\"), @annot.JoinColumn(name=\"ADDRESS_ID1\")})";
IndexedDeclarationAnnotationAdapter cidaa = new CombinationIndexedDeclarationAnnotationAdapter(
"annot.JoinColumn", "annot.JoinColumns", "columns", 3);
- IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), cidaa);
+ IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), cidaa);
Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu));
assertNotNull(annotation);
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/MemberAnnotationElementAdapterTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/MemberAnnotationElementAdapterTests.java
index 0f0f35ef29..3d1267c9c4 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/MemberAnnotationElementAdapterTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/MemberAnnotationElementAdapterTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2009 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2010 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -18,7 +18,7 @@ import org.eclipse.jpt.core.internal.utility.jdt.CharacterStringExpressionConver
import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.EnumArrayDeclarationAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.EnumDeclarationAnnotationElementAdapter;
-import org.eclipse.jpt.core.internal.utility.jdt.MemberAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.AnnotatedElementAnnotationElementAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NestedIndexedDeclarationAnnotationAdapter;
import org.eclipse.jpt.core.internal.utility.jdt.NumberIntegerExpressionConverter;
@@ -57,7 +57,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=\"xxx\")");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("xxx", aea.getValue());
}
@@ -66,7 +66,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=48)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<Integer> daea = new ConversionDeclarationAnnotationElementAdapter<Integer>(daa, "bar", NumberIntegerExpressionConverter.instance());
- AnnotationElementAdapter<Integer> aea = new MemberAnnotationElementAdapter<Integer>(this.idField(cu), daea);
+ AnnotationElementAdapter<Integer> aea = new AnnotatedElementAnnotationElementAdapter<Integer>(this.idField(cu), daea);
assertEquals(Integer.valueOf(48), aea.getValue());
}
@@ -75,7 +75,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar='c')");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", CharacterStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("c", aea.getValue());
}
@@ -84,7 +84,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=false)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<Boolean> daea = new ConversionDeclarationAnnotationElementAdapter<Boolean>(daa, "bar", BooleanExpressionConverter.instance());
- AnnotationElementAdapter<Boolean> aea = new MemberAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
+ AnnotationElementAdapter<Boolean> aea = new AnnotatedElementAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
assertEquals(Boolean.FALSE, aea.getValue());
}
@@ -97,7 +97,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
DeclarationAnnotationAdapter daa2 = new NestedDeclarationAnnotationAdapter(daa1, "value", "annot.Bar");
DeclarationAnnotationAdapter daa3 = new NestedDeclarationAnnotationAdapter(daa2, "jimmy", "annot.Baz");
DeclarationAnnotationElementAdapter<Boolean> daea = new ConversionDeclarationAnnotationElementAdapter<Boolean>(daa3, "fred", BooleanExpressionConverter.instance());
- AnnotationElementAdapter<Boolean> aea = new MemberAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
+ AnnotationElementAdapter<Boolean> aea = new AnnotatedElementAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
assertEquals(Boolean.FALSE, aea.getValue());
}
@@ -106,7 +106,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(false)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<Boolean> daea = new ConversionDeclarationAnnotationElementAdapter<Boolean>(daa, BooleanExpressionConverter.instance());
- AnnotationElementAdapter<Boolean> aea = new MemberAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
+ AnnotationElementAdapter<Boolean> aea = new AnnotatedElementAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
assertEquals(Boolean.FALSE, aea.getValue());
}
@@ -115,7 +115,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertNull(aea.getValue());
}
@@ -124,7 +124,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType();
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertNull(aea.getValue());
}
@@ -137,7 +137,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
DeclarationAnnotationAdapter daa2 = new NestedDeclarationAnnotationAdapter(daa1, "value", "annot.Bar");
DeclarationAnnotationAdapter daa3 = new NestedDeclarationAnnotationAdapter(daa2, "jimmy", "annot.Baz");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa3, "fred");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertNull(aea.getValue());
}
@@ -146,7 +146,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=\"xxx\" + \"yyy\" + \"zzz\")");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("xxxyyyzzz", aea.getValue());
}
@@ -156,7 +156,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("private static final String FOO_BAR = \"xxx\"; @annot.Foo(bar=FOO_BAR + \"yyy\" + \"zzz\")");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("xxxyyyzzz", aea.getValue());
}
@@ -165,7 +165,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=47 - 7 + 2 * 1 / 1)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<Integer> daea = ConversionDeclarationAnnotationElementAdapter.forNumbers(daa, "bar");
- AnnotationElementAdapter<Integer> aea = new MemberAnnotationElementAdapter<Integer>(this.idField(cu), daea);
+ AnnotationElementAdapter<Integer> aea = new AnnotatedElementAnnotationElementAdapter<Integer>(this.idField(cu), daea);
assertEquals(Integer.valueOf(42), aea.getValue());
}
@@ -174,7 +174,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=2 << 2)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<Integer> daea = ConversionDeclarationAnnotationElementAdapter.forNumbers(daa, "bar");
- AnnotationElementAdapter<Integer> aea = new MemberAnnotationElementAdapter<Integer>(this.idField(cu), daea);
+ AnnotationElementAdapter<Integer> aea = new AnnotatedElementAnnotationElementAdapter<Integer>(this.idField(cu), daea);
assertEquals(Integer.valueOf(8), aea.getValue());
}
@@ -184,7 +184,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("private static final int FOO_BAR = 77; @annot.Foo(bar=FOO_BAR)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<Integer> daea = ConversionDeclarationAnnotationElementAdapter.forNumbers(daa, "bar");
- AnnotationElementAdapter<Integer> aea = new MemberAnnotationElementAdapter<Integer>(this.idField(cu), daea);
+ AnnotationElementAdapter<Integer> aea = new AnnotatedElementAnnotationElementAdapter<Integer>(this.idField(cu), daea);
assertEquals(Integer.valueOf(77), aea.getValue());
}
@@ -194,7 +194,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("private static final char FOO_BAR = 'Q'; @annot.Foo(bar=FOO_BAR)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forCharacters(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("Q", aea.getValue());
}
@@ -203,7 +203,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=(char) 0x41)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forCharacters(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("A", aea.getValue());
}
@@ -212,7 +212,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=7 > 2)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<Boolean> daea = ConversionDeclarationAnnotationElementAdapter.forBooleans(daa, "bar");
- AnnotationElementAdapter<Boolean> aea = new MemberAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
+ AnnotationElementAdapter<Boolean> aea = new AnnotatedElementAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
assertEquals(Boolean.TRUE, aea.getValue());
}
@@ -221,7 +221,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=7 == 2)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<Boolean> daea = ConversionDeclarationAnnotationElementAdapter.forBooleans(daa, "bar");
- AnnotationElementAdapter<Boolean> aea = new MemberAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
+ AnnotationElementAdapter<Boolean> aea = new AnnotatedElementAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
assertEquals(Boolean.FALSE, aea.getValue());
}
@@ -230,7 +230,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=(7 != 2) && false)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<Boolean> daea = ConversionDeclarationAnnotationElementAdapter.forBooleans(daa, "bar");
- AnnotationElementAdapter<Boolean> aea = new MemberAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
+ AnnotationElementAdapter<Boolean> aea = new AnnotatedElementAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
assertEquals(Boolean.FALSE, aea.getValue());
}
@@ -239,7 +239,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=(7 != 2) ? false : true)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<Boolean> daea = ConversionDeclarationAnnotationElementAdapter.forBooleans(daa, "bar");
- AnnotationElementAdapter<Boolean> aea = new MemberAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
+ AnnotationElementAdapter<Boolean> aea = new AnnotatedElementAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
assertEquals(Boolean.FALSE, aea.getValue());
}
@@ -248,7 +248,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=77)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertNull(aea.getValue());
}
@@ -257,7 +257,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=bazzzz)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertNull(aea.getValue());
}
@@ -266,7 +266,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=bazzzz)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<Boolean> daea = ConversionDeclarationAnnotationElementAdapter.forBooleans(daa, "bar");
- AnnotationElementAdapter<Boolean> aea = new MemberAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
+ AnnotationElementAdapter<Boolean> aea = new AnnotatedElementAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
assertNull(aea.getValue());
}
@@ -275,7 +275,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=\"bazzzz\")");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forCharacters(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertNull(aea.getValue());
}
@@ -284,7 +284,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=\"java.lang.Object\")");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", SimpleTypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertNull(aea.getValue());
}
@@ -294,7 +294,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=enums.TestEnum.class)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new EnumDeclarationAnnotationElementAdapter(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertNull(aea.getValue());
}
@@ -310,7 +310,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
DeclarationAnnotationAdapter daa2 = new NestedDeclarationAnnotationAdapter(daa1, "value", "annot.Bar");
DeclarationAnnotationAdapter daa3 = new NestedDeclarationAnnotationAdapter(daa2, "jimmy", "annot.Baz");
DeclarationAnnotationElementAdapter<Boolean> daea = new ConversionDeclarationAnnotationElementAdapter<Boolean>(daa3, "fred", BooleanExpressionConverter.instance());
- AnnotationElementAdapter<Boolean> aea = new MemberAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
+ AnnotationElementAdapter<Boolean> aea = new AnnotatedElementAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
assertNull(aea.getValue());
}
@@ -319,7 +319,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar={true, false})");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String[]> daea = new ConversionDeclarationAnnotationElementAdapter<String[]>(daa, "bar", AnnotationStringArrayExpressionConverter.forStrings());
- AnnotationElementAdapter<String[]> aea = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea);
+ AnnotationElementAdapter<String[]> aea = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea);
assertTrue(Arrays.equals(new String[] {null, null}, aea.getValue()));
}
@@ -328,7 +328,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=77)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String[]> daea = new ConversionDeclarationAnnotationElementAdapter<String[]>(daa, "bar", AnnotationStringArrayExpressionConverter.forStrings());
- AnnotationElementAdapter<String[]> aea = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea);
+ AnnotationElementAdapter<String[]> aea = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea);
assertTrue(Arrays.equals(new String[] {null}, aea.getValue()));
}
@@ -340,7 +340,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType(annotation);
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
TextRange textRange = new ASTNodeTextRange(aea.getAstNode(this.buildASTRoot(cu)));
assertEquals(this.getSource(cu).indexOf(value), textRange.getOffset());
@@ -360,7 +360,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
DeclarationAnnotationAdapter daa2 = new NestedDeclarationAnnotationAdapter(daa1, "value", "annot.Bar");
DeclarationAnnotationAdapter daa3 = new NestedDeclarationAnnotationAdapter(daa2, "jimmy", "annot.Baz");
DeclarationAnnotationElementAdapter<Boolean> daea = new ConversionDeclarationAnnotationElementAdapter<Boolean>(daa3, "fred", BooleanExpressionConverter.instance());
- AnnotationElementAdapter<Boolean> aea = new MemberAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
+ AnnotationElementAdapter<Boolean> aea = new AnnotatedElementAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
assertEquals(Boolean.FALSE, aea.getValue());
TextRange textRange = new ASTNodeTextRange(aea.getAstNode(this.buildASTRoot(cu)));
assertEquals(value.length(), textRange.getLength());
@@ -373,7 +373,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType(annotation);
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa);
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
TextRange textRange = new ASTNodeTextRange(aea.getAstNode(this.buildASTRoot(cu)));
assertEquals(this.getSource(cu).indexOf(element), textRange.getOffset());
@@ -386,7 +386,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType(annotation);
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa);
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
TextRange textRange = new ASTNodeTextRange(aea.getAstNode(this.buildASTRoot(cu)));
assertEquals(this.getSource(cu).indexOf(annotation), textRange.getOffset());
@@ -400,7 +400,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
this.assertSourceContains(annotation, cu);
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue(null);
this.assertSourceDoesNotContain("Foo", cu);
@@ -413,7 +413,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
this.assertSourceContains(annotation, cu);
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "bar", false);
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue(null);
this.assertSourceDoesNotContain(annotation, cu);
@@ -431,7 +431,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
DeclarationAnnotationAdapter daa2 = new NestedDeclarationAnnotationAdapter(daa1, "value", "annot.Bar");
DeclarationAnnotationAdapter daa3 = new NestedDeclarationAnnotationAdapter(daa2, "jimmy", "annot.Baz");
DeclarationAnnotationElementAdapter<Boolean> daea = new ConversionDeclarationAnnotationElementAdapter<Boolean>(daa3, "fred", BooleanExpressionConverter.instance());
- AnnotationElementAdapter<Boolean> aea = new MemberAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
+ AnnotationElementAdapter<Boolean> aea = new AnnotatedElementAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
aea.setValue(null);
this.assertSourceDoesNotContain(annotation, cu);
@@ -450,7 +450,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
DeclarationAnnotationAdapter daa2 = new NestedDeclarationAnnotationAdapter(daa1, "value", "annot.Bar", false);
DeclarationAnnotationAdapter daa3 = new NestedDeclarationAnnotationAdapter(daa2, "jimmy", "annot.Baz", false);
DeclarationAnnotationElementAdapter<Boolean> daea = new ConversionDeclarationAnnotationElementAdapter<Boolean>(daa3, "fred", BooleanExpressionConverter.instance());
- AnnotationElementAdapter<Boolean> aea = new MemberAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
+ AnnotationElementAdapter<Boolean> aea = new AnnotatedElementAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
aea.setValue(null);
this.assertSourceDoesNotContain(annotation, cu);
@@ -462,7 +462,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType();
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue("xxx");
this.assertSourceContains("@Foo(bar = \"xxx\")", cu);
@@ -479,7 +479,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
DeclarationAnnotationAdapter daa2 = new NestedDeclarationAnnotationAdapter(daa1, "value", "annot.Bar");
DeclarationAnnotationAdapter daa3 = new NestedDeclarationAnnotationAdapter(daa2, "jimmy", "annot.Baz");
DeclarationAnnotationElementAdapter<Boolean> daea = new ConversionDeclarationAnnotationElementAdapter<Boolean>(daa3, "fred", BooleanExpressionConverter.instance());
- AnnotationElementAdapter<Boolean> aea = new MemberAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
+ AnnotationElementAdapter<Boolean> aea = new AnnotatedElementAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
aea.setValue(Boolean.TRUE);
this.assertSourceDoesNotContain(annotation, cu);
@@ -495,7 +495,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
DeclarationAnnotationAdapter daa2 = new NestedDeclarationAnnotationAdapter(daa1, "value", "annot.Bar");
DeclarationAnnotationAdapter daa3 = new NestedDeclarationAnnotationAdapter(daa2, "jimmy", "annot.Baz");
DeclarationAnnotationElementAdapter<Boolean> daea = new ConversionDeclarationAnnotationElementAdapter<Boolean>(daa3, "fred", BooleanExpressionConverter.instance());
- AnnotationElementAdapter<Boolean> aea = new MemberAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
+ AnnotationElementAdapter<Boolean> aea = new AnnotatedElementAnnotationElementAdapter<Boolean>(this.idField(cu), daea);
aea.setValue(Boolean.TRUE);
this.assertSourceContains("@Foo(@Bar(jimmy = @Baz(fred = true)))", cu);
@@ -508,7 +508,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
this.assertSourceContains(annotation, cu);
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue("yyy");
this.assertSourceDoesNotContain(annotation, cu);
@@ -522,7 +522,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
this.assertSourceContains(annotation, cu);
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue("xxx");
this.assertSourceContains("@Foo(bar = \"xxx\")", cu);
@@ -535,7 +535,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
this.assertSourceContains(annotation, cu);
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue("xxx");
this.assertSourceDoesNotContain(annotation, cu);
@@ -549,7 +549,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
this.assertSourceContains(annotation, cu);
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "baz");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue("yyy");
this.assertSourceDoesNotContain(annotation, cu);
@@ -567,7 +567,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
DeclarationAnnotationAdapter daa2 = new NestedDeclarationAnnotationAdapter(daa1, "value", "annot.Bar");
DeclarationAnnotationAdapter daa3 = new NestedIndexedDeclarationAnnotationAdapter(daa2, "jimmy", 2, "annot.Baz");
DeclarationAnnotationElementAdapter<Integer> daea = new ConversionDeclarationAnnotationElementAdapter<Integer>(daa3, "fred", NumberIntegerExpressionConverter.instance());
- AnnotationElementAdapter<Integer> aea = new MemberAnnotationElementAdapter<Integer>(this.idField(cu), daea);
+ AnnotationElementAdapter<Integer> aea = new AnnotatedElementAnnotationElementAdapter<Integer>(this.idField(cu), daea);
assertEquals(Integer.valueOf(2), aea.getValue());
aea.setValue(Integer.valueOf(48));
@@ -581,7 +581,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
this.assertSourceContains(annotation, cu);
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "value");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue("xxx");
this.assertSourceContains("@Foo(\"xxx\")", cu);
@@ -594,7 +594,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
this.assertSourceContains(annotation, cu);
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = ConversionDeclarationAnnotationElementAdapter.forStrings(daa, "value");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue("xxx");
this.assertSourceDoesNotContain(annotation, cu);
@@ -606,7 +606,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=java.lang.Object.class)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", SimpleTypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("java.lang.Object", aea.getValue());
}
@@ -615,7 +615,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType();
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", SimpleTypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue("java.lang.Object");
this.assertSourceContains("@Foo(bar = java.lang.Object.class)", cu);
}
@@ -625,7 +625,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=int.class)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", SimpleTypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertNull(aea.getValue());
}
@@ -634,7 +634,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=java.util.Map.Entry.class)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", SimpleTypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("java.util.Map.Entry", aea.getValue());
}
@@ -643,7 +643,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=int.class)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", PrimitiveTypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("int", aea.getValue());
}
@@ -652,7 +652,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType();
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", PrimitiveTypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue("int");
this.assertSourceContains("@Foo(bar = int.class)", cu);
}
@@ -662,7 +662,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=java.lang.Object.class)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", PrimitiveTypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertNull(aea.getValue());
}
@@ -671,7 +671,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=void.class)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", PrimitiveTypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("void", aea.getValue());
}
@@ -680,7 +680,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=java.lang.Object.class)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", TypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("java.lang.Object", aea.getValue());
}
@@ -689,7 +689,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType();
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", TypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue("java.lang.Object");
this.assertSourceContains("@Foo(bar = java.lang.Object.class)", cu);
}
@@ -699,7 +699,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=java.util.Map.Entry.class)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", TypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("java.util.Map.Entry", aea.getValue());
}
@@ -708,7 +708,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=int.class)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", TypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("int", aea.getValue());
}
@@ -717,7 +717,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType();
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", TypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue("int");
this.assertSourceContains("@Foo(bar = int.class)", cu);
}
@@ -727,7 +727,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=void.class)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new ConversionDeclarationAnnotationElementAdapter<String>(daa, "bar", TypeStringExpressionConverter.instance());
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("void", aea.getValue());
}
@@ -737,7 +737,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo(bar=enums.TestEnum.XXX)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new EnumDeclarationAnnotationElementAdapter(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("enums.TestEnum.XXX", aea.getValue());
}
@@ -747,7 +747,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("static enums.TestEnum.XXX", "@annot.Foo(bar=XXX)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new EnumDeclarationAnnotationElementAdapter(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("enums.TestEnum.XXX", aea.getValue());
}
@@ -757,7 +757,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("@annot.Foo");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new EnumDeclarationAnnotationElementAdapter(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertNull(aea.getValue());
}
@@ -767,7 +767,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
ICompilationUnit cu = this.createTestType("enums.TestEnum", "@annot.Foo(bar=TestEnum.XXX)");
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new EnumDeclarationAnnotationElementAdapter(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
assertEquals("enums.TestEnum.XXX", aea.getValue());
}
@@ -779,7 +779,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
this.assertSourceContains(expected, cu);
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new EnumDeclarationAnnotationElementAdapter(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue(null);
this.assertSourceDoesNotContain("Foo", cu);
}
@@ -792,7 +792,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
this.assertSourceDoesNotContain(expected, cu);
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea = new EnumDeclarationAnnotationElementAdapter(daa, "bar");
- AnnotationElementAdapter<String> aea = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea);
+ AnnotationElementAdapter<String> aea = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea);
aea.setValue("enums.TestEnum.XXX");
this.assertSourceContains("import static enums.TestEnum.XXX;", cu);
this.assertSourceContains(expected, cu);
@@ -809,11 +809,11 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea1 = new EnumDeclarationAnnotationElementAdapter(daa, "bar1");
- AnnotationElementAdapter<String> aea1 = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea1);
+ AnnotationElementAdapter<String> aea1 = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea1);
aea1.setValue("enums1.TestEnum.XXX");
DeclarationAnnotationElementAdapter<String> daea2 = new EnumDeclarationAnnotationElementAdapter(daa, "bar2");
- AnnotationElementAdapter<String> aea2 = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea2);
+ AnnotationElementAdapter<String> aea2 = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea2);
aea2.setValue("enums2.TestEnum.XXX");
this.assertSourceContains("import static enums1.TestEnum.XXX;", cu);
@@ -833,11 +833,11 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea1 = new EnumDeclarationAnnotationElementAdapter(daa, "bar1");
- AnnotationElementAdapter<String> aea1 = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea1);
+ AnnotationElementAdapter<String> aea1 = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea1);
assertNotNull(aea1.getValue());
DeclarationAnnotationElementAdapter<String> daea2 = new EnumDeclarationAnnotationElementAdapter(daa, "bar2");
- AnnotationElementAdapter<String> aea2 = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea2);
+ AnnotationElementAdapter<String> aea2 = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea2);
aea2.setValue("enums2.TestEnum.XXX");
this.assertSourceContains("import static enums1.TestEnum.*;", cu);
@@ -857,11 +857,11 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase {
DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo");
DeclarationAnnotationElementAdapter<String> daea1 = new EnumDeclarationAnnotationElementAdapter(daa, "bar1");
- AnnotationElementAdapter<String> aea1 = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea1);
+ AnnotationElementAdapter<String> aea1 = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea1);
aea1.setValue("enums.TestEnum1.XXX");
DeclarationAnnotationElementAdapter<String> daea2 = new EnumDeclarationAnnotationElementAdapter(daa, "bar2");
- AnnotationElementAdapter<String> aea2 = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea2);
+ AnnotationElementAdapter<String> aea2 = new AnnotatedElementAnnotationElemen