diff options
author | kmoore | 2010-10-12 20:58:38 +0000 |
---|---|---|
committer | kmoore | 2010-10-12 20:58:38 +0000 |
commit | 5ff7c6963dfaf6200d3dc1c0e7dfb789bb7693f8 (patch) | |
tree | 1c2ead4272e07c9070e5188942c23e44ef46b469 /jpa/tests/org.eclipse.jpt.core.tests | |
parent | 8bd2f0628732a49f4b470ed5cfaa4c33bfc27a28 (diff) | |
download | webtools.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.
Diffstat (limited to 'jpa/tests/org.eclipse.jpt.core.tests')
7 files changed, 305 insertions, 305 deletions
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 AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea2); aea2.setValue("enums.TestEnum2.XXX"); this.assertSourceContains("import static enums.TestEnum1.XXX;", cu); @@ -880,11 +880,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("enums.TestEnum2.XXX"); this.assertSourceContains("import static enums.TestEnum1.*;", cu); @@ -907,11 +907,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 AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea2); aea2.setValue("enums.TestEnum2.XXX"); this.assertSourceContains("import enums.*;", cu); @@ -932,15 +932,15 @@ 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"); DeclarationAnnotationElementAdapter<String> daea3 = new EnumDeclarationAnnotationElementAdapter(daa, "bar3"); - AnnotationElementAdapter<String> aea3 = new MemberAnnotationElementAdapter<String>(this.idField(cu), daea3); + AnnotationElementAdapter<String> aea3 = new AnnotatedElementAnnotationElementAdapter<String>(this.idField(cu), daea3); aea3.setValue("enums3.TestEnum.XXX"); this.assertSourceContains("import static enums1.TestEnum.XXX;", cu); @@ -956,7 +956,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { ICompilationUnit cu = this.createTestType("@annot.Foo(bar={\"string0\", \"string1\"})"); 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[] {"string0", "string1"}, aea.getValue())); } @@ -965,7 +965,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { ICompilationUnit cu = this.createTestType("@annot.Foo(bar={\"stri\" + \"ng0\", \"s\" + \"tring1\"})"); 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[] {"string0", "string1"}, aea.getValue())); } @@ -974,7 +974,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { ICompilationUnit cu = this.createTestType("@annot.Foo(bar={})"); 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[0], aea.getValue())); } @@ -983,7 +983,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { ICompilationUnit cu = this.createTestType("@annot.Foo(bar=\"string0\")"); 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[] {"string0"}, aea.getValue())); } @@ -992,7 +992,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { ICompilationUnit cu = this.createTestType("@annot.Foo()"); 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[0], aea.getValue())); } @@ -1003,7 +1003,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { this.assertSourceDoesNotContain(expected, cu); 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); aea.setValue(new String[] {"string0", "string1"}); this.assertSourceContains(expected, cu); } @@ -1015,7 +1015,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { this.assertSourceDoesNotContain(expected, cu); 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); aea.setValue(new String[0]); this.assertSourceDoesNotContain(expected, cu); } @@ -1028,7 +1028,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); ExpressionConverter<String[]> expressionConverter = new AnnotationStringArrayExpressionConverter(StringExpressionConverter.instance(), false); DeclarationAnnotationElementAdapter<String[]> daea = new ConversionDeclarationAnnotationElementAdapter<String[]>(daa, "bar", expressionConverter); - AnnotationElementAdapter<String[]> aea = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea); + AnnotationElementAdapter<String[]> aea = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea); aea.setValue(new String[0]); this.assertSourceContains(expected, cu); } @@ -1040,7 +1040,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { this.assertSourceDoesNotContain(annotation, cu); 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); aea.setValue(new String[] {"string0"}); this.assertSourceContains(annotation, cu); } @@ -1051,7 +1051,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { ICompilationUnit cu = this.createTestType("@annot.Foo(bar={enums.TestEnum.XXX, enums.TestEnum.YYY})"); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationElementAdapter<String[]> daea = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar"); - 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[] {"enums.TestEnum.XXX", "enums.TestEnum.YYY"}, aea.getValue())); } @@ -1061,7 +1061,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { ICompilationUnit cu = this.createTestType("@annot.Foo(bar={enums.TestEnum.XXX, 88})"); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationElementAdapter<String[]> daea = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar"); - 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[] {"enums.TestEnum.XXX", null}, aea.getValue())); } @@ -1071,7 +1071,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { ICompilationUnit cu = this.createTestType("@annot.Foo(bar={})"); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationElementAdapter<String[]> daea = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar"); - 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[0], aea.getValue())); } @@ -1081,7 +1081,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 EnumArrayDeclarationAnnotationElementAdapter(daa, "bar"); - 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[] {"enums.TestEnum.XXX"}, aea.getValue())); } @@ -1091,7 +1091,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { ICompilationUnit cu = this.createTestType("@annot.Foo(bar=\"\")"); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationElementAdapter<String[]> daea = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar"); - 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())); } @@ -1101,7 +1101,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { ICompilationUnit cu = this.createTestType("@annot.Foo()"); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationElementAdapter<String[]> daea = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar"); - 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[0], aea.getValue())); } @@ -1113,7 +1113,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { this.assertSourceDoesNotContain(expected, cu); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationElementAdapter<String[]> daea = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar"); - AnnotationElementAdapter<String[]> aea = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea); + AnnotationElementAdapter<String[]> aea = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea); aea.setValue(new String[] {"enums.TestEnum.XXX", "enums.TestEnum.YYY"}); this.assertSourceContains("import static enums.TestEnum.XXX;", cu); this.assertSourceContains("import static enums.TestEnum.YYY;", cu); @@ -1128,7 +1128,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { this.assertSourceDoesNotContain(expected, cu); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationElementAdapter<String[]> daea = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar"); - AnnotationElementAdapter<String[]> aea = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea); + AnnotationElementAdapter<String[]> aea = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea); aea.setValue(new String[0]); this.assertSourceDoesNotContain(expected, cu); } @@ -1141,7 +1141,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { this.assertSourceDoesNotContain(expected, cu); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationElementAdapter<String[]> daea = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar", true, false); - AnnotationElementAdapter<String[]> aea = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea); + AnnotationElementAdapter<String[]> aea = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea); aea.setValue(new String[0]); this.assertSourceContains(expected, cu); } @@ -1154,7 +1154,7 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { this.assertSourceDoesNotContain(expected, cu); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationElementAdapter<String[]> daea = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar"); - AnnotationElementAdapter<String[]> aea = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea); + AnnotationElementAdapter<String[]> aea = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea); aea.setValue(new String[] {"enums.TestEnum.XXX"}); this.assertSourceContains("import static enums.TestEnum.XXX;", cu); this.assertSourceContains(expected, cu); @@ -1171,11 +1171,11 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationElementAdapter<String[]> daea1 = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar1"); - AnnotationElementAdapter<String[]> aea1 = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea1); + AnnotationElementAdapter<String[]> aea1 = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea1); aea1.setValue(new String[] {"enums1.TestEnum.XXX", "enums1.TestEnum.YYY"}); DeclarationAnnotationElementAdapter<String[]> daea2 = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar2"); - AnnotationElementAdapter<String[]> aea2 = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea2); + AnnotationElementAdapter<String[]> aea2 = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea2); aea2.setValue(new String[] {"enums2.TestEnum.XXX", "enums2.TestEnum.YYY"}); this.assertSourceContains("import static enums1.TestEnum.XXX;", cu); @@ -1197,11 +1197,11 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationElementAdapter<String[]> daea1 = new EnumArrayDeclarationAnnotationElementAdapter(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 EnumArrayDeclarationAnnotationElementAdapter(daa, "bar2"); - AnnotationElementAdapter<String[]> aea2 = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea2); + AnnotationElementAdapter<String[]> aea2 = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea2); aea2.setValue(new String[] {"enums2.TestEnum.XXX", "enums2.TestEnum.YYY"}); this.assertSourceContains("import static enums1.TestEnum.*;", cu); @@ -1222,11 +1222,11 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationElementAdapter<String[]> daea1 = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar1"); - AnnotationElementAdapter<String[]> aea1 = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea1); + AnnotationElementAdapter<String[]> aea1 = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea1); aea1.setValue(new String[] {"enums.TestEnum1.XXX", "enums.TestEnum1.YYY"}); DeclarationAnnotationElementAdapter<String[]> daea2 = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar2"); - AnnotationElementAdapter<String[]> aea2 = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea2); + AnnotationElementAdapter<String[]> aea2 = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea2); aea2.setValue(new String[] {"enums.TestEnum2.XXX", "enums.TestEnum2.YYY"}); this.assertSourceContains("import static enums.TestEnum1.XXX;", cu); @@ -1248,11 +1248,11 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationElementAdapter<String[]> daea1 = new EnumArrayDeclarationAnnotationElementAdapter(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 EnumArrayDeclarationAnnotationElementAdapter(daa, "bar2"); - AnnotationElementAdapter<String[]> aea2 = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea2); + AnnotationElementAdapter<String[]> aea2 = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea2); aea2.setValue(new String[] {"enums.TestEnum2.XXX", "enums.TestEnum2.YYY"}); this.assertSourceContains("import static enums.TestEnum1.*;", cu); @@ -1274,15 +1274,15 @@ public class MemberAnnotationElementAdapterTests extends AnnotationTestCase { DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationElementAdapter<String[]> daea1 = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar1"); - AnnotationElementAdapter<String[]> aea1 = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea1); + AnnotationElementAdapter<String[]> aea1 = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea1); aea1.setValue(new String[] {"enums1.TestEnum.XXX", "enums1.TestEnum.YYY"}); DeclarationAnnotationElementAdapter<String[]> daea2 = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar2"); - AnnotationElementAdapter<String[]> aea2 = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea2); + AnnotationElementAdapter<String[]> aea2 = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea2); aea2.setValue(new String[] {"enums2.TestEnum.XXX", "enums2.TestEnum.YYY"}); DeclarationAnnotationElementAdapter<String[]> daea3 = new EnumArrayDeclarationAnnotationElementAdapter(daa, "bar3"); - AnnotationElementAdapter<String[]> aea3 = new MemberAnnotationElementAdapter<String[]>(this.idField(cu), daea3); + AnnotationElementAdapter<String[]> aea3 = new AnnotatedElementAnnotationElementAdapter<String[]>(this.idField(cu), daea3); aea3.setValue(new String[] {"enums3.TestEnum.XXX", "enums3.TestEnum.YYY"}); this.assertSourceContains("import static enums1.TestEnum.XXX;", cu); diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/NestedDeclarationAnnotationAdapterTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/NestedDeclarationAnnotationAdapterTests.java index a6687e348b..ca5c934d45 100644 --- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/NestedDeclarationAnnotationAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/NestedDeclarationAnnotationAdapterTests.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. @@ -14,7 +14,7 @@ import org.eclipse.jdt.core.dom.Annotation; import org.eclipse.jdt.core.dom.NormalAnnotation; import org.eclipse.jdt.core.dom.SingleMemberAnnotation; import org.eclipse.jdt.core.dom.StringLiteral; -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.utility.jdt.AnnotationAdapter; @@ -40,7 +40,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotation", "annot.Bar"); - 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.Bar", annotation.getTypeName().getFullyQualifiedName()); @@ -56,7 +56,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationAdapter daa2 = new NestedDeclarationAnnotationAdapter(daa1, "nestedAnnotation", "annot.Bar"); DeclarationAnnotationAdapter daa3 = new NestedDeclarationAnnotationAdapter(daa2, "yana", "annot.Baz"); - AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa3); + AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa3); Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); assertEquals("annot.Baz", annotation.getTypeName().getFullyQualifiedName()); @@ -70,7 +70,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotation", "annot.Bar"); - 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); } @@ -82,7 +82,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotation", "annot.Bar"); - 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); } @@ -94,7 +94,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotation", "annot.Bar"); - 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); } @@ -107,7 +107,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotation", "annot.Bar"); - 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); } @@ -121,7 +121,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotation", "annot.Bar"); - 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); @@ -139,7 +139,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotation", "annot.Bar", false); - 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); @@ -156,7 +156,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotation", "annot.Bar"); - 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); @@ -173,7 +173,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotation", "annot.Bar"); - 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); @@ -191,7 +191,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotation", "annot.Bar"); - 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); @@ -210,7 +210,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daaFoo = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationAdapter daaBar = new NestedDeclarationAnnotationAdapter(daaFoo, "nestedAnnotation1", "annot.Bar"); DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter(daaBar, "nestedAnnotation2", "annot.Baz"); - 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); @@ -232,7 +232,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daaFoo = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationAdapter daaBar = new NestedDeclarationAnnotationAdapter(daaFoo, "nestedAnnotation1", "annot.Bar", false); DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter(daaBar, "nestedAnnotation2", "annot.Baz", false); - 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); @@ -249,7 +249,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotation", "annot.Bar"); - 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); @@ -265,7 +265,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", "annot.Bar"); - 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); @@ -282,7 +282,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotation", "annot.Bar"); - 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); @@ -299,7 +299,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", "annot.Bar"); - 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); @@ -316,7 +316,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotation", "annot.Bar"); - 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); @@ -333,7 +333,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", "annot.Bar"); - 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); @@ -350,7 +350,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotation", "annot.Bar"); - 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); @@ -367,7 +367,7 @@ public class NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", "annot.Bar"); - 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 NestedDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa = new NestedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", "annot.Bar"); - AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa); + AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa); SingleMemberAnnotation annotation = (SingleMemberAnnotation) aa.getAnnotation(this.buildASTRoot(cu)); assertNull(annotation); diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/NestedIndexedDeclarationAnnotationAdapterTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/NestedIndexedDeclarationAnnotationAdapterTests.java index 383ad73660..9a4f8bb6ac 100644 --- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/NestedIndexedDeclarationAnnotationAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/NestedIndexedDeclarationAnnotationAdapterTests.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.CompilationUnit; import org.eclipse.jdt.core.dom.NormalAnnotation; import org.eclipse.jdt.core.dom.NumberLiteral; import org.eclipse.jdt.core.dom.SingleMemberAnnotation; -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.utility.jdt.AnnotationAdapter; @@ -49,7 +49,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe // 0 DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa); + AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa); CompilationUnit astRoot = this.buildASTRoot(cu); Annotation annotation = aa.getAnnotation(astRoot); assertNotNull(annotation); @@ -59,7 +59,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe // 1 daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 1, "annot.Bar"); - aa = new MemberAnnotationAdapter(this.idField(cu), daa); + aa = new ElementAnnotationAdapter(this.idField(cu), daa); annotation = aa.getAnnotation(astRoot); assertNotNull(annotation); assertEquals("annot.Bar", annotation.getTypeName().getFullyQualifiedName()); @@ -74,7 +74,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "nestedAnnotations", 0, "annot.Bar"); DeclarationAnnotationAdapter daa3 = new NestedIndexedDeclarationAnnotationAdapter(daa2, "yana", 0, "annot.Baz"); - AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa3); + AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa3); Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); assertEquals("annot.Baz", annotation.getTypeName().getFullyQualifiedName()); @@ -89,7 +89,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "nestedAnnotations", 0, "annot.Bar"); DeclarationAnnotationAdapter daa3 = new NestedIndexedDeclarationAnnotationAdapter(daa2, "yana", 0, "annot.Baz"); - AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa3); + AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa3); CompilationUnit astRoot = this.buildASTRoot(cu); Annotation annotation = aa.getAnnotation(astRoot); assertNotNull(annotation); @@ -98,7 +98,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe // name mismatch daa3 = new NestedIndexedDeclarationAnnotationAdapter(daa2, "yana", 0, "annot.Xyz"); - aa = new MemberAnnotationAdapter(this.idField(cu), daa3); + aa = new ElementAnnotationAdapter(this.idField(cu), daa3); annotation = aa.getAnnotation(astRoot); assertNull(annotation); } @@ -109,7 +109,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe ICompilationUnit cu = this.createTestType("@annot.Foo()"); DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); } @@ -120,7 +120,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe ICompilationUnit cu = this.createTestType(); DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); } @@ -131,7 +131,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe ICompilationUnit cu = this.createTestType("@annot.Foo(nestedAnnotations=\"annot.Bar\")"); DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); } @@ -143,7 +143,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe ICompilationUnit cu = this.createTestType("@annot.Foo(nestedAnnotations=@annot.NotBar)"); DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); } @@ -154,7 +154,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe ICompilationUnit cu = this.createTestType("@annot.Foo(nestedAnnotations={@annot.Bar, @annot.Bar(\"two\")})"); DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 2, "annot.Bar"); - 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); } @@ -168,7 +168,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("Foo"); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "nestedAnnotations", 0, "annot.Bar"); DeclarationAnnotationAdapter daa3 = new NestedIndexedDeclarationAnnotationAdapter(daa2, "yana", 0, "annot.Xyz"); - AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa3); + AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa3); Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu)); assertNull(annotation); } @@ -184,7 +184,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "nestedAnnotations", 0, "annot.Bar"); - AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa2); Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -201,7 +201,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); @@ -218,7 +218,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); @@ -236,7 +236,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); @@ -253,7 +253,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "nestedAnnotations", 0, "annot.Bar"); - AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa2); Annotation annotation = aa.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -271,9 +271,9 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe this.assertSourceContains(na, cu); DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "nestedAnnotations", 0, "annot.Bar", false); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); Annotation annotation = aa2.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -293,7 +293,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); @@ -311,7 +311,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); @@ -327,9 +327,9 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe this.assertSourceContains(na, cu); DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "nestedAnnotations", 2, "annot.Bar"); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); CompilationUnit astRoot = this.buildASTRoot(cu); Annotation annotation = aa2.getAnnotation(astRoot); assertNotNull(annotation); @@ -349,9 +349,9 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe this.assertSourceContains(na, cu); DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "value", 2, "annot.Bar"); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); CompilationUnit astRoot = this.buildASTRoot(cu); Annotation annotation = aa2.getAnnotation(astRoot); assertNotNull(annotation); @@ -374,7 +374,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "value", 0, "annot.Bar"); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); Annotation annotation = aa2.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -393,9 +393,9 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe this.assertSourceContains(na, cu); DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "value", 1, "annot.Bar"); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); Annotation annotation = aa2.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -415,9 +415,9 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe this.assertSourceContains(na, cu); DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "value", 2, "annot.Bar"); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); Annotation annotation = aa2.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -436,7 +436,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "value", 1, "annot.Bar"); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); Annotation annotation = aa2.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -454,9 +454,9 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe this.assertSourceContains(na, cu); DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "value", 2, "annot.Bar"); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); Annotation annotation = aa2.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -476,9 +476,9 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe this.assertSourceContains(na, cu); DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "value", 2, "annot.Bar"); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); CompilationUnit astRoot = this.buildASTRoot(cu); Annotation annotation = aa2.getAnnotation(astRoot); assertNotNull(annotation); @@ -499,9 +499,9 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe this.assertSourceContains(na, cu); DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "value", 3, "annot.Bar"); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); CompilationUnit astRoot = this.buildASTRoot(cu); Annotation annotation = aa2.getAnnotation(astRoot); assertNotNull(annotation); @@ -522,9 +522,9 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe this.assertSourceContains(na, cu); DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "nestedAnnotations", 2, "annot.Bar"); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); Annotation annotation = aa2.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -543,7 +543,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "nestedAnnotations", 1, "annot.Bar"); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); Annotation annotation = aa2.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -561,9 +561,9 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe this.assertSourceContains(na, cu); DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "nestedAnnotations", 2, "annot.Bar"); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); Annotation annotation = aa2.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -583,9 +583,9 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe this.assertSourceContains(na, cu); DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "nestedAnnotations", 2, "annot.Bar"); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); CompilationUnit astRoot = this.buildASTRoot(cu); Annotation annotation = aa2.getAnnotation(astRoot); assertNotNull(annotation); @@ -606,9 +606,9 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe this.assertSourceContains(na, cu); DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); DeclarationAnnotationAdapter daa2 = new NestedIndexedDeclarationAnnotationAdapter(daa1, "nestedAnnotations", 3, "annot.Bar"); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); CompilationUnit astRoot = this.buildASTRoot(cu); Annotation annotation = aa2.getAnnotation(astRoot); assertNotNull(annotation); @@ -627,7 +627,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); @@ -643,7 +643,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 0, "annot.Bar"); - 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); @@ -660,7 +660,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); @@ -677,7 +677,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 0, "annot.Bar"); - 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); @@ -694,7 +694,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); @@ -711,7 +711,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 0, "annot.Bar"); - 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); @@ -728,7 +728,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); @@ -745,7 +745,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 0, "annot.Bar"); - 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); @@ -760,7 +760,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 5, "annot.Bar"); - AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa); + AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa); assertNull(aa.getAnnotation(this.buildASTRoot(cu))); aa.newMarkerAnnotation(); @@ -777,7 +777,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 5, "annot.Bar"); - 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); @@ -795,7 +795,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 0, "annot.Bar"); - 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); @@ -811,7 +811,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 5, "annot.Bar"); - 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); @@ -828,7 +828,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 0, "annot.Bar"); - 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); @@ -844,7 +844,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 5, "annot.Bar"); - 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); @@ -862,7 +862,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 0, "annot.Bar"); - 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); @@ -879,7 +879,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 1, "annot.Bar"); - 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); @@ -896,7 +896,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); @@ -912,7 +912,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 5, "annot.Bar"); - 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); @@ -929,7 +929,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); @@ -947,7 +947,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - 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); @@ -964,7 +964,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 5, "annot.Bar"); - 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); @@ -981,7 +981,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 0, "annot.Bar"); - AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa); + AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa); aa.newMarkerAnnotation(); this.assertSourceContains(expected, cu); } @@ -995,7 +995,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 2, "annot.Bar"); - AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa); + AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa); aa.newMarkerAnnotation(); this.assertSourceContains(expected, cu); } @@ -1009,7 +1009,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 2, "annot.Bar"); - AnnotationAdapter aa = new MemberAnnotationAdapter(this.idField(cu), daa); + AnnotationAdapter aa = new ElementAnnotationAdapter(this.idField(cu), daa); aa.newMarkerAnnotation(); this.assertSourceContains(expected, cu); } @@ -1025,7 +1025,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 4, "annot.Bar"); - 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); @@ -1042,7 +1042,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 4, "annot.Bar"); - 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); @@ -1254,7 +1254,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 5, "annot.Bar"); - 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); @@ -1272,7 +1272,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 5, "annot.Bar"); - 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); @@ -1314,7 +1314,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 5, "annot.Bar"); - 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); @@ -1355,7 +1355,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 5, "annot.Bar"); - 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); @@ -1447,7 +1447,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 5, "annot.Bar"); - 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); @@ -1515,7 +1515,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 5, "annot.Bar"); - 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); @@ -1736,7 +1736,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 5, "annot.Bar"); - 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); @@ -1754,7 +1754,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 5, "annot.Bar"); - 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); @@ -1794,7 +1794,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 5, "annot.Bar"); - 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); @@ -1833,7 +1833,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 5, "annot.Bar"); - 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); @@ -1919,7 +1919,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 5, "annot.Bar"); - 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); @@ -1983,7 +1983,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe DeclarationAnnotationAdapter daa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "nestedAnnotations", 5, "annot.Bar"); - 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); @@ -2021,7 +2021,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe IndexedDeclarationAnnotationAdapter idaa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 0, "annot.Bar"); - IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), idaa); + IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), idaa); Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -2038,7 +2038,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe IndexedDeclarationAnnotationAdapter idaa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 1, "annot.Bar"); - IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), idaa); + IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), idaa); Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -2055,7 +2055,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe IndexedDeclarationAnnotationAdapter idaa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 3, "annot.Bar"); - IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), idaa); + IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), idaa); Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -2072,7 +2072,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe IndexedDeclarationAnnotationAdapter idaa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 3, "annot.Bar"); - IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), idaa); + IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), idaa); Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -2089,7 +2089,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe IndexedDeclarationAnnotationAdapter idaa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 2, "annot.Bar"); - IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), idaa); + IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), idaa); Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -2106,7 +2106,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe IndexedDeclarationAnnotationAdapter idaa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 0, "annot.Bar"); - IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), idaa); + IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), idaa); Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -2123,7 +2123,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe IndexedDeclarationAnnotationAdapter idaa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 3, "annot.Bar"); - IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), idaa); + IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), idaa); Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu)); assertNull(annotation); @@ -2140,7 +2140,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe IndexedDeclarationAnnotationAdapter idaa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 3, "annot.Bar"); - IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), idaa); + IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), idaa); Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu)); assertNull(annotation); @@ -2156,7 +2156,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe IndexedDeclarationAnnotationAdapter idaa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 0, "annot.Bar"); - IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), idaa); + IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), idaa); Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu)); assertNull(annotation); @@ -2172,7 +2172,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe IndexedDeclarationAnnotationAdapter idaa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 2, "annot.Bar"); - IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), idaa); + IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), idaa); Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu)); assertNull(annotation); iaa.moveAnnotation(1); @@ -2186,7 +2186,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe IndexedDeclarationAnnotationAdapter idaa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 1, "annot.Bar"); - IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), idaa); + IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), idaa); Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu)); assertNull(annotation); @@ -2202,7 +2202,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe IndexedDeclarationAnnotationAdapter idaa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 2, "annot.Bar"); - IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), idaa); + IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), idaa); Annotation annotation = iaa.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation); @@ -2218,7 +2218,7 @@ public class NestedIndexedDeclarationAnnotationAdapterTests extends AnnotationTe IndexedDeclarationAnnotationAdapter idaa = new NestedIndexedDeclarationAnnotationAdapter( new SimpleDeclarationAnnotationAdapter("annot.Foo"), "value", 3, "annot.Bar"); - IndexedAnnotationAdapter iaa = new MemberIndexedAnnotationAdapter(this.idField(cu), idaa); + IndexedAnnotationAdapter iaa = new ElementIndexedAnnotationAdapter(this.idField(cu), idaa); 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/SimpleDeclarationAnnotationAdapterTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/SimpleDeclarationAnnotationAdapterTests.java index 58846359db..5560a706a9 100644 --- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/SimpleDeclarationAnnotationAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/utility/jdt/SimpleDeclarationAnnotationAdapterTests.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.jdt.core.dom.NormalAnnotation; import org.eclipse.jdt.core.dom.NumberLiteral; import org.eclipse.jdt.core.dom.SingleMemberAnnotation; import org.eclipse.jdt.core.dom.StringLiteral; -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.SimpleDeclarationAnnotationAdapter; import org.eclipse.jpt.core.utility.jdt.AnnotationAdapter; import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter; @@ -44,7 +44,7 @@ public class SimpleDeclarationAnnotationAdapterTests extends AnnotationTestCase this.createAnnotation("Foo"); ICompilationUnit cu = this.createTestType("@annot.Foo"); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - 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.Foo", annotation.getTypeName().getFullyQualifiedName()); @@ -55,7 +55,7 @@ public class SimpleDeclarationAnnotationAdapterTests extends AnnotationTestCase this.createAnnotation("Foo"); ICompilationUnit cu = this.createTestType("@annot.Foo(1) @annot.Foo(2)"); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - 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.Foo", annotation.getTypeName().getFullyQualifiedName()); @@ -69,7 +69,7 @@ public class SimpleDeclarationAnnotationAdapterTests extends AnnotationTestCase this.createAnnotation("Foo"); ICompilationUnit cu = this.createTestType("annot.Foo", "@Foo"); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - 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("Foo", annotation.getTypeName().getFullyQualifiedName()); @@ -80,7 +80,7 @@ public class SimpleDeclarationAnnotationAdapterTests extends AnnotationTestCase this.createAnnotation("Foo"); ICompilationUnit cu = this.createTestType(); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - 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); } @@ -90,7 +90,7 @@ public class SimpleDeclarationAnnotationAdapterTests extends AnnotationTestCase this.createAnnotation("Fop"); ICompilationUnit cu = this.createTestType("@annot.Fop"); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - 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); this.assertSourceContains("@annot.Fop", cu); @@ -101,7 +101,7 @@ public class SimpleDeclarationAnnotationAdapterTests extends AnnotationTestCase ICompilationUnit cu = this.createTestType("@annot.Foo"); // un-qualified name DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("Foo"); - 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); this.assertSourceContains("@annot.Foo", cu); @@ -112,7 +112,7 @@ public class SimpleDeclarationAnnotationAdapterTests extends AnnotationTestCase ICompilationUnit cu = this.createTestType("@annot.Foo"); this.assertSourceContains("@annot.Foo", cu); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - 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); @@ -125,7 +125,7 @@ public class SimpleDeclarationAnnotationAdapterTests extends AnnotationTestCase ICompilationUnit cu = this.createTestType("@annot.Foo(1) @annot.Foo(2)"); this.assertSourceContains("@annot.Foo(1) @annot.Foo(2)", cu); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - 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); @@ -140,7 +140,7 @@ public class SimpleDeclarationAnnotationAdapterTests extends AnnotationTestCase this.assertSourceDoesNotContain("import annot.Foo;", cu); this.assertSourceDoesNotContain("@Foo", cu); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - 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); @@ -153,7 +153,7 @@ public class SimpleDeclarationAnnotationAdapterTests extends AnnotationTestCase this.createAnnotation("Foo"); ICompilationUnit cu = this.createTestType("@annot.Foo(88)"); DeclarationAnnotationAdapter daa = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - 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); @@ -216,11 +216,11 @@ public class SimpleDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot1.Foo"); DeclarationAnnotationAdapter daa2 = new SimpleDeclarationAnnotationAdapter("annot2.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); Annotation annotation1 = aa1.getAnnotation(this.buildASTRoot(cu)); assertNull(annotation1); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); Annotation annotation2 = aa2.getAnnotation(this.buildASTRoot(cu)); assertNull(annotation2); @@ -242,11 +242,11 @@ public class SimpleDeclarationAnnotationAdapterTests extends AnnotationTestCase DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot1.Foo"); DeclarationAnnotationAdapter daa2 = new SimpleDeclarationAnnotationAdapter("annot2.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); Annotation annotation1 = aa1.getAnnotation(this.buildASTRoot(cu)); assertNotNull(annotation1); - AnnotationAdapter aa2 = new MemberAnnotationAdapter(this.idField(cu), daa2); + AnnotationAdapter aa2 = new ElementAnnotationAdapter(this.idField(cu), daa2); Annotation annotation2 = aa2.getAnnotation(this.buildASTRoot(cu)); assertNull(annotation2); @@ -262,7 +262,7 @@ public class SimpleDeclarationAnnotationAdapterTests extends AnnotationTestCase this.assertSourceDoesNotContain("@Foo", cu); DeclarationAnnotationAdapter daa1 = new SimpleDeclarationAnnotationAdapter("annot.Foo"); - AnnotationAdapter aa1 = new MemberAnnotationAdapter(this.idField(cu), daa1); + AnnotationAdapter aa1 = new ElementAnnotationAdapter(this.idField(cu), daa1); Annotation annotation1 = aa1.getAnnotation(this.buildASTRoot(cu)); assertNull(annotation1); |