summaryrefslogtreecommitdiffstats
path: root/weaver/testsrc/org
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-07-15 16:09:02 +0000
committeracolyer <acolyer>2005-07-15 16:09:02 +0000
commit17f150e1033357d7aa561200bd32526118183857 (patch)
tree420d428dbe72c7e7f976fdcf1ea2446a4f3a8570 /weaver/testsrc/org
parentbe1b2ad17aa2b7f8cd5724a02f0a2b42dd3c60b4 (diff)
downloadaspectj-17f150e1033357d7aa561200bd32526118183857.tar.gz
aspectj-17f150e1033357d7aa561200bd32526118183857.zip
This is the beginning of a significant refactoring needed to cleanly support generics. We need to be much crisper about when we have an unresolved type (plain old TypeX) and when we have a resolved type. This refactoring renames TypeX to UnresolvedType and ResolvedTypeX to ResolvedType. In addition, it moves a number of methods that were defined on TypeX but which can only be answered by resolved types down onto ResolvedType. At the moment, ResolvedType still extends UnresolvedType - but a ResolvedType is *not* a UnresolvedType and this inheritance of convenience will be broken down the line so that ResolvedType does not extend UnresolvedType. Full signature information can only be known for ResolvedTypes.
Diffstat (limited to 'weaver/testsrc/org')
-rw-r--r--weaver/testsrc/org/aspectj/weaver/AbstractWorldTestCase.java94
-rw-r--r--weaver/testsrc/org/aspectj/weaver/BoundedReferenceTypeTestCase.java14
-rw-r--r--weaver/testsrc/org/aspectj/weaver/GenericsWildCardTypeXTestCase.java2
-rw-r--r--weaver/testsrc/org/aspectj/weaver/MemberTestCase.java36
-rw-r--r--weaver/testsrc/org/aspectj/weaver/MemberTestCase15.java6
-rw-r--r--weaver/testsrc/org/aspectj/weaver/ParameterizedReferenceTypeTestCase.java6
-rw-r--r--weaver/testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java12
-rw-r--r--weaver/testsrc/org/aspectj/weaver/TestShadow.java18
-rw-r--r--weaver/testsrc/org/aspectj/weaver/TypeVariableReferenceTypeTestCase.java6
-rw-r--r--weaver/testsrc/org/aspectj/weaver/TypeVariableTestCase.java34
-rw-r--r--weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java82
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/AfterThrowingWeaveTestCase.java2
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/ArgsWeaveTestCase.java10
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/AroundWeaveTestCase.java4
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/BcelGenericSignatureToTypeXTestCase.java18
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/HierarchyDependsTestCase.java8
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/MegaZipTestCase.java4
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/NonstaticWeaveTestCase.java4
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java2
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/PointcutResidueTestCase.java10
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/TjpWeaveTestCase.java8
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/WeaveOrderTestCase.java38
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/WorldTestCase.java26
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternMatchingTestCase.java30
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java24
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/ConcretizationTestCase.java20
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java4
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/PointcutTestCase.java4
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/TestScope.java2
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/TypePatternListTestCase.java4
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/TypePatternTestCase.java6
-rw-r--r--weaver/testsrc/org/aspectj/weaver/patterns/WithinTestCase.java4
32 files changed, 272 insertions, 270 deletions
diff --git a/weaver/testsrc/org/aspectj/weaver/AbstractWorldTestCase.java b/weaver/testsrc/org/aspectj/weaver/AbstractWorldTestCase.java
index 5a5121f25..306cc1da4 100644
--- a/weaver/testsrc/org/aspectj/weaver/AbstractWorldTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/AbstractWorldTestCase.java
@@ -32,35 +32,35 @@ public abstract class AbstractWorldTestCase extends TestCase {
protected abstract World getWorld();
- private final TypeX[] primitiveTypeXs =
- TypeX.forSignatures(
+ private final UnresolvedType[] primitiveTypeXs =
+ UnresolvedType.forSignatures(
new String[] {"B", "S", "C", "I", "J", "F", "D", "V"});
public void testPrimitiveTypes() {
- ResolvedTypeX[] primitives = getWorld().resolve(primitiveTypeXs);
+ ResolvedType[] primitives = getWorld().resolve(primitiveTypeXs);
for(int i = 0, len = primitives.length; i < len; i++) {
- ResolvedTypeX ty = primitives[i];
+ ResolvedType ty = primitives[i];
modifiersTest(ty, Modifier.PUBLIC | Modifier.FINAL);
fieldsTest(ty, ResolvedMember.NONE);
methodsTest(ty, ResolvedMember.NONE);
- interfacesTest(ty, ResolvedTypeX.NONE);
+ interfacesTest(ty, ResolvedType.NONE);
superclassTest(ty, null);
pointcutsTest(ty, ResolvedMember.NONE);
isInterfaceTest(ty, false);
isClassTest(ty, false);
isAspectTest(ty, false);
for (int j = 0; j < len; j++) {
- ResolvedTypeX ty1 = primitives[j];
+ ResolvedType ty1 = primitives[j];
if (ty.equals(ty1)) {
isCoerceableFromTest(ty, ty1, true);
- } else if (ty == ResolvedTypeX.BOOLEAN || ty1 == ResolvedTypeX.BOOLEAN ||
- ty == ResolvedTypeX.VOID || ty1 == ResolvedTypeX.VOID) {
+ } else if (ty == ResolvedType.BOOLEAN || ty1 == ResolvedType.BOOLEAN ||
+ ty == ResolvedType.VOID || ty1 == ResolvedType.VOID) {
isCoerceableFromTest(ty, ty1, false);
} else {
isCoerceableFromTest(ty, ty1, true);
}
}
- isCoerceableFromTest(ty, TypeX.OBJECT, false);
+ isCoerceableFromTest(ty, UnresolvedType.OBJECT, false);
primAssignTest("B", new String[] {});
primAssignTest("S", new String[] {"B"});
@@ -75,12 +75,12 @@ public abstract class AbstractWorldTestCase extends TestCase {
}
}
private void primAssignTest(String sig, String[] lowers) {
- ResolvedTypeX[] primitives = getWorld().resolve(primitiveTypeXs);
- TypeX tx = TypeX.forSignature(sig);
- ResolvedTypeX ty = getWorld().resolve(tx,true);
- assertTrue("Couldnt find type "+tx,ty!=ResolvedTypeX.MISSING);
- ResolvedTypeX[] lowerTyArray =
- getWorld().resolve(TypeX.forSignatures(lowers));
+ ResolvedType[] primitives = getWorld().resolve(primitiveTypeXs);
+ UnresolvedType tx = UnresolvedType.forSignature(sig);
+ ResolvedType ty = getWorld().resolve(tx,true);
+ assertTrue("Couldnt find type "+tx,ty!=ResolvedType.MISSING);
+ ResolvedType[] lowerTyArray =
+ getWorld().resolve(UnresolvedType.forSignatures(lowers));
List lowerTys = new ArrayList(Arrays.asList(lowerTyArray));
lowerTys.add(ty);
Set allLowerTys = new HashSet(lowerTys);
@@ -88,40 +88,40 @@ public abstract class AbstractWorldTestCase extends TestCase {
allUpperTys.removeAll(allLowerTys);
for (Iterator i = allLowerTys.iterator(); i.hasNext(); ) {
- ResolvedTypeX other = (ResolvedTypeX) i.next();
+ ResolvedType other = (ResolvedType) i.next();
isAssignableFromTest(ty, other, true);
}
for (Iterator i = allUpperTys.iterator(); i.hasNext(); ) {
- ResolvedTypeX other = (ResolvedTypeX) i.next();
+ ResolvedType other = (ResolvedType) i.next();
isAssignableFromTest(ty, other, false);
}
}
public void testPrimitiveArrays() {
- ResolvedTypeX[] primitives = getWorld().resolve(primitiveTypeXs);
+ ResolvedType[] primitives = getWorld().resolve(primitiveTypeXs);
for(int i = 0, len = primitives.length; i < len; i++) {
- ResolvedTypeX ty = primitives[i];
- TypeX tx = TypeX.forSignature("["+ty.getSignature());
- ResolvedTypeX aty = getWorld().resolve(tx,true);
- assertTrue("Couldnt find type "+tx,aty!=ResolvedTypeX.MISSING);
+ ResolvedType ty = primitives[i];
+ UnresolvedType tx = UnresolvedType.forSignature("["+ty.getSignature());
+ ResolvedType aty = getWorld().resolve(tx,true);
+ assertTrue("Couldnt find type "+tx,aty!=ResolvedType.MISSING);
modifiersTest(aty, Modifier.PUBLIC | Modifier.FINAL);
fieldsTest(aty, ResolvedMember.NONE);
methodsTest(aty, ResolvedMember.NONE);
- interfacesTest(aty, new ResolvedTypeX[] {
- getWorld().getCoreType(TypeX.CLONEABLE),
- getWorld().getCoreType(TypeX.SERIALIZABLE) });
- superclassTest(aty, TypeX.OBJECT);
+ interfacesTest(aty, new ResolvedType[] {
+ getWorld().getCoreType(UnresolvedType.CLONEABLE),
+ getWorld().getCoreType(UnresolvedType.SERIALIZABLE) });
+ superclassTest(aty, UnresolvedType.OBJECT);
pointcutsTest(aty, ResolvedMember.NONE);
isInterfaceTest(aty, false);
isClassTest(aty, false);
isAspectTest(aty, false);
for (int j = 0; j < len; j++) {
- ResolvedTypeX ty1 = primitives[j];
+ ResolvedType ty1 = primitives[j];
isCoerceableFromTest(aty, ty1, false);
- tx = TypeX.forSignature("[" + ty1.getSignature());
- ResolvedTypeX aty1 = getWorld().resolve(tx,true);
- assertTrue("Couldnt find type "+tx,aty1!=ResolvedTypeX.MISSING);
+ tx = UnresolvedType.forSignature("[" + ty1.getSignature());
+ ResolvedType aty1 = getWorld().resolve(tx,true);
+ assertTrue("Couldnt find type "+tx,aty1!=ResolvedType.MISSING);
if (ty.equals(ty1)) {
isCoerceableFromTest(aty, aty1, true);
isAssignableFromTest(aty, aty1, true);
@@ -133,44 +133,44 @@ public abstract class AbstractWorldTestCase extends TestCase {
}
}
- // ---- tests for parts of ResolvedTypeX objects
+ // ---- tests for parts of ResolvedType objects
- protected void modifiersTest(ResolvedTypeX ty, int mods) {
+ protected void modifiersTest(ResolvedType ty, int mods) {
assertEquals(ty + " modifiers:", Modifier.toString(mods), Modifier.toString(ty.getModifiers()));
}
- protected void fieldsTest(ResolvedTypeX ty, Member[] x) {
+ protected void fieldsTest(ResolvedType ty, Member[] x) {
TestUtil.assertSetEquals(ty + " fields:", x, ty.getDeclaredJavaFields());
}
- protected void methodsTest(ResolvedTypeX ty, Member[] x) {
+ protected void methodsTest(ResolvedType ty, Member[] x) {
TestUtil.assertSetEquals(ty + " methods:", x, ty.getDeclaredJavaMethods());
}
- protected void mungersTest(ResolvedTypeX ty, ShadowMunger[] x) {
+ protected void mungersTest(ResolvedType ty, ShadowMunger[] x) {
TestUtil.assertSetEquals(ty + " mungers:", x, ty.getDeclaredShadowMungersArray());
}
- protected void interfacesTest(ResolvedTypeX ty, ResolvedTypeX[] x) {
+ protected void interfacesTest(ResolvedType ty, ResolvedType[] x) {
TestUtil.assertArrayEquals(ty + " interfaces:", x, ty.getDeclaredInterfaces());
}
- protected void superclassTest(ResolvedTypeX ty, TypeX x) {
+ protected void superclassTest(ResolvedType ty, UnresolvedType x) {
assertEquals(ty + " superclass:", x, ty.getSuperclass());
}
- protected void pointcutsTest(ResolvedTypeX ty, Member[] x) {
+ protected void pointcutsTest(ResolvedType ty, Member[] x) {
TestUtil.assertSetEquals(ty + " pointcuts:", x, ty.getDeclaredPointcuts());
}
- protected void isInterfaceTest(ResolvedTypeX ty, boolean x) {
+ protected void isInterfaceTest(ResolvedType ty, boolean x) {
assertEquals(ty + " is interface:", x, ty.isInterface());
}
- protected void isAspectTest(ResolvedTypeX ty, boolean x) {
+ protected void isAspectTest(ResolvedType ty, boolean x) {
assertEquals(ty + " is aspect:", x, ty.isAspect());
}
- protected void isClassTest(ResolvedTypeX ty, boolean x) {
+ protected void isClassTest(ResolvedType ty, boolean x) {
assertEquals(ty + " is class:", x, ty.isClass());
}
- protected void isCoerceableFromTest(TypeX ty0, TypeX ty1, boolean x) {
- assertEquals(ty0 + " is coerceable from " + ty1, x, ty0.isCoerceableFrom(ty1, getWorld()));
- assertEquals(ty1 + " is coerceable from " + ty0, x, ty1.isCoerceableFrom(ty0, getWorld()));
+ protected void isCoerceableFromTest(UnresolvedType ty0, UnresolvedType ty1, boolean x) {
+ assertEquals(ty0 + " is coerceable from " + ty1, x, ty0.resolve(getWorld()).isCoerceableFrom(ty1.resolve(getWorld())));
+ assertEquals(ty1 + " is coerceable from " + ty0, x, ty1.resolve(getWorld()).isCoerceableFrom(ty0.resolve(getWorld())));
}
- protected void isAssignableFromTest(TypeX ty0, TypeX ty1, boolean x) {
- assertEquals(ty0 + " is assignable from " + ty1, x, ty0.isAssignableFrom(ty1, getWorld()));
+ protected void isAssignableFromTest(UnresolvedType ty0, UnresolvedType ty1, boolean x) {
+ assertEquals(ty0 + " is assignable from " + ty1, x, ty0.resolve(getWorld()).isAssignableFrom(ty1.resolve(getWorld())));
}
// ---- tests for parts of ResolvedMethod objects
@@ -178,7 +178,7 @@ public abstract class AbstractWorldTestCase extends TestCase {
protected void modifiersTest(ResolvedMember m, int mods) {
assertEquals(m + " modifiers:", Modifier.toString(mods), Modifier.toString(m.getModifiers()));
}
- protected void exceptionsTest(ResolvedMember m, TypeX[] exns) {
+ protected void exceptionsTest(ResolvedMember m, UnresolvedType[] exns) {
TestUtil.assertSetEquals(m + " exceptions:", exns, m.getExceptions());
}
diff --git a/weaver/testsrc/org/aspectj/weaver/BoundedReferenceTypeTestCase.java b/weaver/testsrc/org/aspectj/weaver/BoundedReferenceTypeTestCase.java
index f8df609da..b46a5a6a6 100644
--- a/weaver/testsrc/org/aspectj/weaver/BoundedReferenceTypeTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/BoundedReferenceTypeTestCase.java
@@ -54,8 +54,8 @@ public class BoundedReferenceTypeTestCase extends TestCase {
}
public void testGetDeclaredInterfacesNoAdditions() {
- ResolvedTypeX[] rt1 = extendsClass.getDeclaredInterfaces();
- ResolvedTypeX[] rt2 = javaLangClass.getDeclaredInterfaces();
+ ResolvedType[] rt1 = extendsClass.getDeclaredInterfaces();
+ ResolvedType[] rt2 = javaLangClass.getDeclaredInterfaces();
assertEquals("same length",rt1.length,rt2.length);
for (int i = 0; i < rt2.length; i++) {
assertEquals("same methods",rt1[i],rt2[i]);
@@ -63,8 +63,8 @@ public class BoundedReferenceTypeTestCase extends TestCase {
}
public void testGetDeclaredInterfacesWithInterfaceBounds() {
- ResolvedTypeX[] rt1 = extendsWithExtras.getDeclaredInterfaces();
- ResolvedTypeX[] rt2 = javaLangClass.getDeclaredInterfaces();
+ ResolvedType[] rt1 = extendsWithExtras.getDeclaredInterfaces();
+ ResolvedType[] rt2 = javaLangClass.getDeclaredInterfaces();
assertEquals("one extra interface",rt1.length,rt2.length + 1);
for (int i = 0; i < rt2.length; i++) {
assertEquals("same methods",rt1[i],rt2[i]);
@@ -95,11 +95,11 @@ public class BoundedReferenceTypeTestCase extends TestCase {
protected void setUp() throws Exception {
super.setUp();
BcelWorld world = new BcelWorld();
- javaLangClass = (ReferenceType) world.resolve(TypeX.forName("java/lang/Class"));
- javaLangObject = (ReferenceType) world.resolve(TypeX.OBJECT);
+ javaLangClass = (ReferenceType) world.resolve(UnresolvedType.forName("java/lang/Class"));
+ javaLangObject = (ReferenceType) world.resolve(UnresolvedType.OBJECT);
extendsClass = new BoundedReferenceType(javaLangClass,true,world);
superClass = new BoundedReferenceType(javaLangClass,false,world);
extendsWithExtras = new BoundedReferenceType(javaLangClass,true,world,
- new ReferenceType[] {(ReferenceType)world.resolve(TypeX.forName("java/util/List"))});
+ new ReferenceType[] {(ReferenceType)world.resolve(UnresolvedType.forName("java/util/List"))});
}
}
diff --git a/weaver/testsrc/org/aspectj/weaver/GenericsWildCardTypeXTestCase.java b/weaver/testsrc/org/aspectj/weaver/GenericsWildCardTypeXTestCase.java
index 942812071..3545a496c 100644
--- a/weaver/testsrc/org/aspectj/weaver/GenericsWildCardTypeXTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/GenericsWildCardTypeXTestCase.java
@@ -22,7 +22,7 @@ import junit.framework.TestCase;
public class GenericsWildCardTypeXTestCase extends TestCase {
public void testIdentity() {
- TypeX anything = GenericsWildcardTypeX.GENERIC_WILDCARD;
+ UnresolvedType anything = GenericsWildcardTypeX.GENERIC_WILDCARD;
assertEquals("Ljava/lang/Object;",anything.getSignature());
}
diff --git a/weaver/testsrc/org/aspectj/weaver/MemberTestCase.java b/weaver/testsrc/org/aspectj/weaver/MemberTestCase.java
index f1ac6e997..d0b8e7812 100644
--- a/weaver/testsrc/org/aspectj/weaver/MemberTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/MemberTestCase.java
@@ -31,7 +31,7 @@ public class MemberTestCase extends TestCase {
public void testMethodConstruction() {
Member s = Member.methodFromString("void Foo.goo(int)");
- Member t = Member.method(TypeX.forName("Foo"), 0, "goo", "(I)V");
+ Member t = Member.method(UnresolvedType.forName("Foo"), 0, "goo", "(I)V");
Member u = Member.methodFromString("void Foo1.goo(int)");
Member v = Member.methodFromString("int Foo.goo(int)");
@@ -69,8 +69,8 @@ public class MemberTestCase extends TestCase {
kindTest(m, Member.METHOD);
declaringTypeTest(m, "Foo");
nameTest(m, "goo");
- parameterTypesTest(m, new TypeX[] { ResolvedTypeX.INT });
- returnTypeTest(m, ResolvedTypeX.VOID);
+ parameterTypesTest(m, new UnresolvedType[] { ResolvedType.INT });
+ returnTypeTest(m, ResolvedType.VOID);
isInterfaceTest(m, false);
isPrivateTest(m, false);
isConstructorTest(m, false);
@@ -80,8 +80,8 @@ public class MemberTestCase extends TestCase {
kindTest(m, Member.METHOD);
declaringTypeTest(m, "java.util.Iterator");
nameTest(m, "next");
- parameterTypesTest(m, TypeX.NONE);
- returnTypeTest(m, TypeX.OBJECT);
+ parameterTypesTest(m, UnresolvedType.NONE);
+ returnTypeTest(m, UnresolvedType.OBJECT);
isInterfaceTest(m, true);
isPrivateTest(m, false);
isConstructorTest(m, false);
@@ -91,8 +91,8 @@ public class MemberTestCase extends TestCase {
kindTest(m, Member.CONSTRUCTOR);
declaringTypeTest(m, "Foo");
nameTest(m, "<init>");
- parameterTypesTest(m, new TypeX[] { ResolvedTypeX.INT, TypeX.OBJECT } );
- returnTypeTest(m, ResolvedTypeX.VOID);
+ parameterTypesTest(m, new UnresolvedType[] { ResolvedType.INT, UnresolvedType.OBJECT } );
+ returnTypeTest(m, ResolvedType.VOID);
isInterfaceTest(m, false);
isPrivateTest(m, false);
isConstructorTest(m, true);
@@ -102,8 +102,8 @@ public class MemberTestCase extends TestCase {
kindTest(m, Member.METHOD);
declaringTypeTest(m, "Foo");
nameTest(m, "sqrt");
- parameterTypesTest(m, new TypeX[] { ResolvedTypeX.DOUBLE } );
- returnTypeTest(m, ResolvedTypeX.DOUBLE);
+ parameterTypesTest(m, new UnresolvedType[] { ResolvedType.DOUBLE } );
+ returnTypeTest(m, ResolvedType.DOUBLE);
isInterfaceTest(m, false);
isPrivateTest(m, true);
isConstructorTest(m, false);
@@ -113,8 +113,8 @@ public class MemberTestCase extends TestCase {
kindTest(m, Member.METHOD);
declaringTypeTest(m, "java.lang.Math");
nameTest(m, "max");
- parameterTypesTest(m, new TypeX[] { ResolvedTypeX.INT, ResolvedTypeX.INT } );
- returnTypeTest(m, ResolvedTypeX.INT);
+ parameterTypesTest(m, new UnresolvedType[] { ResolvedType.INT, ResolvedType.INT } );
+ returnTypeTest(m, ResolvedType.INT);
isInterfaceTest(m, false);
isPrivateTest(m, false);
isConstructorTest(m, false);
@@ -126,8 +126,8 @@ public class MemberTestCase extends TestCase {
kindTest(m, Member.FIELD);
declaringTypeTest(m, "Foo");
nameTest(m, "goo");
- parameterTypesTest(m, TypeX.NONE);
- returnTypeTest(m, ResolvedTypeX.INT);
+ parameterTypesTest(m, UnresolvedType.NONE);
+ returnTypeTest(m, ResolvedType.INT);
isInterfaceTest(m, false);
isPrivateTest(m, false);
isConstructorTest(m, false);
@@ -137,8 +137,8 @@ public class MemberTestCase extends TestCase {
kindTest(m, Member.FIELD);
declaringTypeTest(m, "goo.Bar");
nameTest(m, "i");
- parameterTypesTest(m, TypeX.NONE);
- returnTypeTest(m, TypeX.forName("java.util.Iterator"));
+ parameterTypesTest(m, UnresolvedType.NONE);
+ returnTypeTest(m, UnresolvedType.forName("java.util.Iterator"));
isInterfaceTest(m, false);
isPrivateTest(m, false);
isConstructorTest(m, false);
@@ -157,17 +157,17 @@ public class MemberTestCase extends TestCase {
private void isInterfaceTest(Member m, boolean b) {
assertEquals(m + " is interface", b, m.isInterface());
}
- private void returnTypeTest(Member m, TypeX returnType) {
+ private void returnTypeTest(Member m, UnresolvedType returnType) {
assertEquals(m + " return type", returnType, m.getReturnType());
}
- private void parameterTypesTest(Member m, TypeX[] paramTypes) {
+ private void parameterTypesTest(Member m, UnresolvedType[] paramTypes) {
TestUtil.assertArrayEquals(m + " parameters", paramTypes, m.getParameterTypes());
}
private void nameTest(Member m, String name) {
assertEquals(m + " name", name, m.getName());
}
private void declaringTypeTest(Member m, String declaringName) {
- assertEquals(m + " declared in", TypeX.forName(declaringName), m.getDeclaringType());
+ assertEquals(m + " declared in", UnresolvedType.forName(declaringName), m.getDeclaringType());
}
private void kindTest(Member m, Member.Kind kind) {
assertEquals(m + " kind", kind, m.getKind());
diff --git a/weaver/testsrc/org/aspectj/weaver/MemberTestCase15.java b/weaver/testsrc/org/aspectj/weaver/MemberTestCase15.java
index 03111165e..4610b6e3c 100644
--- a/weaver/testsrc/org/aspectj/weaver/MemberTestCase15.java
+++ b/weaver/testsrc/org/aspectj/weaver/MemberTestCase15.java
@@ -23,7 +23,7 @@ public class MemberTestCase15 extends TestCase {
public void testCanBeParameterizedRegularMethod() {
BcelWorld world = new BcelWorld();
- ResolvedTypeX javaLangClass = world.resolve(TypeX.forName("java/lang/Class"));
+ ResolvedType javaLangClass = world.resolve(UnresolvedType.forName("java/lang/Class"));
ResolvedMember[] methods = javaLangClass.getDeclaredMethods();
ResolvedMember getAnnotations = null;
for (int i = 0; i < methods.length; i++) {
@@ -40,7 +40,7 @@ public class MemberTestCase15 extends TestCase {
public void testCanBeParameterizedGenericMethod() {
BcelWorld world = new BcelWorld();
- ResolvedTypeX javaLangClass = world.resolve(TypeX.forName("java/lang/Class"));
+ ResolvedType javaLangClass = world.resolve(UnresolvedType.forName("java/lang/Class"));
ResolvedMember[] methods = javaLangClass.getDeclaredMethods();
ResolvedMember asSubclass = null;
for (int i = 0; i < methods.length; i++) {
@@ -57,7 +57,7 @@ public class MemberTestCase15 extends TestCase {
public void testCanBeParameterizedMethodInGenericType() {
BcelWorld world = new BcelWorld();
- ResolvedTypeX javaUtilList = world.resolve(TypeX.forName("java/util/List"));
+ ResolvedType javaUtilList = world.resolve(UnresolvedType.forName("java/util/List"));
ResolvedMember[] methods = javaUtilList.getDeclaredMethods();
ResolvedMember add = null;
for (int i = 0; i < methods.length; i++) {
diff --git a/weaver/testsrc/org/aspectj/weaver/ParameterizedReferenceTypeTestCase.java b/weaver/testsrc/org/aspectj/weaver/ParameterizedReferenceTypeTestCase.java
index 6a7db20f6..bf4ae07ad 100644
--- a/weaver/testsrc/org/aspectj/weaver/ParameterizedReferenceTypeTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/ParameterizedReferenceTypeTestCase.java
@@ -41,7 +41,7 @@ public class ParameterizedReferenceTypeTestCase extends TestCase {
}
}
}
- TypeX parameterType = add.getParameterTypes()[0];
+ UnresolvedType parameterType = add.getParameterTypes()[0];
assertEquals("Ljava/lang/String;",parameterType.getSignature());
ResolvedMember get = null;
@@ -53,7 +53,7 @@ public class ParameterizedReferenceTypeTestCase extends TestCase {
}
}
}
- TypeX returnType = get.getReturnType();
+ UnresolvedType returnType = get.getReturnType();
assertEquals("Ljava/lang/String;",returnType.getSignature());
}
@@ -62,7 +62,7 @@ public class ParameterizedReferenceTypeTestCase extends TestCase {
super.setUp();
world = new BcelWorld();
listOfString = (ReferenceType)
- world.resolve(TypeX.forParameterizedTypeNames("java/util/List",
+ world.resolve(UnresolvedType.forParameterizedTypeNames("java/util/List",
new String[] {"java/lang/String"}));
}
}
diff --git a/weaver/testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java b/weaver/testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java
index 43ce65d8e..21930aa35 100644
--- a/weaver/testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/ReferenceTypeTestCase.java
@@ -21,20 +21,20 @@ public class ReferenceTypeTestCase extends TestCase {
public void testIsGenericTrue() {
BcelWorld world = new BcelWorld();
- TypeX javaLangClass = TypeX.forName("java/lang/Class");
- ResolvedTypeX rtx = world.resolve(javaLangClass);
+ UnresolvedType javaLangClass = UnresolvedType.forName("java/lang/Class");
+ ResolvedType rtx = world.resolve(javaLangClass);
assertTrue("Resolves to reference type",(rtx instanceof ReferenceType));
ReferenceType rt = (ReferenceType) rtx;
- assertTrue("java.lang.Class is generic",rt.isGeneric());
+ assertTrue("java.lang.Class is generic",rt.isGenericType());
}
public void testIsGenericFalse() {
BcelWorld world = new BcelWorld();
- TypeX javaLangObject = TypeX.forName("java/lang/Object");
- ResolvedTypeX rtx = world.resolve(javaLangObject);
+ UnresolvedType javaLangObject = UnresolvedType.forName("java/lang/Object");
+ ResolvedType rtx = world.resolve(javaLangObject);
assertTrue("Resolves to reference type",(rtx instanceof ReferenceType));
ReferenceType rt = (ReferenceType) rtx;
- assertFalse("java.lang.Object is not generic",rt.isGeneric());
+ assertFalse("java.lang.Object is not generic",rt.isGenericType());
}
}
diff --git a/weaver/testsrc/org/aspectj/weaver/TestShadow.java b/weaver/testsrc/org/aspectj/weaver/TestShadow.java
index 9c1125438..682faa2ea 100644
--- a/weaver/testsrc/org/aspectj/weaver/TestShadow.java
+++ b/weaver/testsrc/org/aspectj/weaver/TestShadow.java
@@ -19,9 +19,9 @@ import org.aspectj.weaver.ast.Var;
public class TestShadow extends Shadow {
private final World world;
- private final TypeX thisType;
+ private final UnresolvedType thisType;
- public TestShadow(Kind kind, Member signature, TypeX thisType, World world) {
+ public TestShadow(Kind kind, Member signature, UnresolvedType thisType, World world) {
super(kind, signature, null);
this.world = world;
this.thisType = thisType;
@@ -32,7 +32,7 @@ public class TestShadow extends Shadow {
}
/** this is subtly wrong. ha ha */
- public TypeX getEnclosingType() {
+ public UnresolvedType getEnclosingType() {
return thisType;
}
@@ -73,42 +73,42 @@ public class TestShadow extends Shadow {
/* (non-Javadoc)
* @see org.aspectj.weaver.Shadow#getKindedAnnotationVar()
*/
- public Var getKindedAnnotationVar(TypeX annotationType) {
+ public Var getKindedAnnotationVar(UnresolvedType annotationType) {
throw new RuntimeException("unimplemented");
}
/* (non-Javadoc)
* @see org.aspectj.weaver.Shadow#getWithinAnnotationVar()
*/
- public Var getWithinAnnotationVar(TypeX annotationType) {
+ public Var getWithinAnnotationVar(UnresolvedType annotationType) {
throw new RuntimeException("unimplemented");
}
/* (non-Javadoc)
* @see org.aspectj.weaver.Shadow#getWithinCodeAnnotationVar()
*/
- public Var getWithinCodeAnnotationVar(TypeX annotationType) {
+ public Var getWithinCodeAnnotationVar(UnresolvedType annotationType) {
throw new RuntimeException("unimplemented");
}
/* (non-Javadoc)
* @see org.aspectj.weaver.Shadow#getThisAnnotationVar()
*/
- public Var getThisAnnotationVar(TypeX annotationType) {
+ public Var getThisAnnotationVar(UnresolvedType annotationType) {
throw new RuntimeException("unimplemented");
}
/* (non-Javadoc)
* @see org.aspectj.weaver.Shadow#getTargetAnnotationVar()
*/
- public Var getTargetAnnotationVar(TypeX annotationType) {
+ public Var getTargetAnnotationVar(UnresolvedType annotationType) {
throw new RuntimeException("unimplemented");
}
/* (non-Javadoc)
* @see org.aspectj.weaver.Shadow#getArgAnnotationVar(int)
*/
- public Var getArgAnnotationVar(int i,TypeX annotationType) {
+ public Var getArgAnnotationVar(int i,UnresolvedType annotationType) {
throw new RuntimeException("unimplemented");
}
diff --git a/weaver/testsrc/org/aspectj/weaver/TypeVariableReferenceTypeTestCase.java b/weaver/testsrc/org/aspectj/weaver/TypeVariableReferenceTypeTestCase.java
index 1ab0c287b..15edbae4b 100644
--- a/weaver/testsrc/org/aspectj/weaver/TypeVariableReferenceTypeTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/TypeVariableReferenceTypeTestCase.java
@@ -38,12 +38,12 @@ public class TypeVariableReferenceTypeTestCase extends TestCase {
protected void setUp() throws Exception {
super.setUp();
world = new BcelWorld();
- javaLangClass = (ReferenceType) world.resolve(TypeX.forName("java/lang/Class"));
- javaLangObject = (ReferenceType) world.resolve(TypeX.OBJECT);
+ javaLangClass = (ReferenceType) world.resolve(UnresolvedType.forName("java/lang/Class"));
+ javaLangObject = (ReferenceType) world.resolve(UnresolvedType.OBJECT);
extendsClass = new BoundedReferenceType(javaLangClass,true,world);
superClass = new BoundedReferenceType(javaLangClass,false,world);
extendsWithExtras = new BoundedReferenceType(javaLangClass,true,world,
- new ReferenceType[] {(ReferenceType)world.resolve(TypeX.forName("java/util/List"))});
+ new ReferenceType[] {(ReferenceType)world.resolve(UnresolvedType.forName("java/util/List"))});
}
}
diff --git a/weaver/testsrc/org/aspectj/weaver/TypeVariableTestCase.java b/weaver/testsrc/org/aspectj/weaver/TypeVariableTestCase.java
index ec4a19101..ec2547acd 100644
--- a/weaver/testsrc/org/aspectj/weaver/TypeVariableTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/TypeVariableTestCase.java
@@ -17,15 +17,15 @@ import junit.framework.TestCase;
public class TypeVariableTestCase extends TestCase {
- private TypeX javaLangNumber;
- private TypeX javaLangDouble;
- private TypeX javaUtilList;
- private TypeX javaIoSerializable;
+ private UnresolvedType javaLangNumber;
+ private UnresolvedType javaLangDouble;
+ private UnresolvedType javaUtilList;
+ private UnresolvedType javaIoSerializable;
private World world;
public void testDefaultBounds() {
TypeVariable tv = new TypeVariable("T");
- assertEquals("Object",TypeX.OBJECT,tv.getUpperBound());
+ assertEquals("Object",UnresolvedType.OBJECT,tv.getUpperBound());
assertEquals("no additional bounds",0,tv.getAdditionalInterfaceBounds().length);
assertNull("no lower bound",tv.getLowerBound());
}
@@ -41,13 +41,13 @@ public class TypeVariableTestCase extends TestCase {
}
public void testAdditionalUpperBounds() {
- TypeVariable tv = new TypeVariable("E",TypeX.OBJECT,new TypeX[] {javaUtilList});
+ TypeVariable tv = new TypeVariable("E",UnresolvedType.OBJECT,new UnresolvedType[] {javaUtilList});
assertEquals("1 additional bound",1,tv.getAdditionalInterfaceBounds().length);
assertEquals("java.util.List",javaUtilList,tv.getAdditionalInterfaceBounds()[0]);
}
public void testLowerBound() {
- TypeVariable tv = new TypeVariable("X",TypeX.OBJECT,new TypeX[0],javaLangDouble);
+ TypeVariable tv = new TypeVariable("X",UnresolvedType.OBJECT,new UnresolvedType[0],javaLangDouble);
assertEquals("java.lang.Double",javaLangDouble,tv.getLowerBound());
}
@@ -55,7 +55,7 @@ public class TypeVariableTestCase extends TestCase {
TypeVariable tv = new TypeVariable(
"T",
javaLangNumber,
- new TypeX[] {javaUtilList},
+ new UnresolvedType[] {javaUtilList},
javaLangDouble
);
tv.resolve(world);
@@ -82,39 +82,39 @@ public class TypeVariableTestCase extends TestCase {
public void testCanBindToUpperFail() {
TypeVariable tv = new TypeVariable("X",javaLangNumber);
tv.resolve(world);
- assertFalse(tv.canBeBoundTo(TypeX.OBJECT.resolve(world)));
+ assertFalse(tv.canBeBoundTo(UnresolvedType.OBJECT.resolve(world)));
}
public void testCanBindToInterfaceMatch() {
- TypeVariable tv = new TypeVariable("T",javaLangNumber,new TypeX[] {javaIoSerializable});
+ TypeVariable tv = new TypeVariable("T",javaLangNumber,new UnresolvedType[] {javaIoSerializable});
tv.resolve(world);
assertTrue(tv.canBeBoundTo(javaLangDouble.resolve(world)));
}
public void testCanBindToInterfaceFail() {
- TypeVariable tv = new TypeVariable("T",javaLangNumber,new TypeX[] {javaUtilList});
+ TypeVariable tv = new TypeVariable("T",javaLangNumber,new UnresolvedType[] {javaUtilList});
tv.resolve(world);
assertFalse(tv.canBeBoundTo(javaLangDouble.resolve(world)));
}
public void testCanBindToLowerMatch() {
- TypeVariable tv = new TypeVariable("T",javaLangNumber,new TypeX[0],javaLangDouble);
+ TypeVariable tv = new TypeVariable("T",javaLangNumber,new UnresolvedType[0],javaLangDouble);
tv.resolve(world);
assertTrue(tv.canBeBoundTo(javaLangNumber.resolve(world)));
}
public void testCanBindToLowerFail() {
- TypeVariable tv = new TypeVariable("T",javaLangNumber,new TypeX[0],javaLangNumber);
+ TypeVariable tv = new TypeVariable("T",javaLangNumber,new UnresolvedType[0],javaLangNumber);
tv.resolve(world);
assertFalse(tv.canBeBoundTo(javaLangDouble.resolve(world)));
}
protected void setUp() throws Exception {
super.setUp();
- javaLangNumber = TypeX.forSignature("Ljava/lang/Number;");
- javaLangDouble = TypeX.forSignature("Ljava/lang/Double;");
- javaIoSerializable = TypeX.forSignature("Ljava/io/Serializable;");
- javaUtilList = TypeX.forSignature("Ljava/util/List;");
+ javaLangNumber = UnresolvedType.forSignature("Ljava/lang/Number;");
+ javaLangDouble = UnresolvedType.forSignature("Ljava/lang/Double;");
+ javaIoSerializable = UnresolvedType.forSignature("Ljava/io/Serializable;");
+ javaUtilList = UnresolvedType.forSignature("Ljava/util/List;");
world = new BcelWorld();
}
diff --git a/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java b/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java
index 6c39a1ef0..793a071bf 100644
--- a/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java
@@ -18,7 +18,7 @@ import junit.framework.TestCase;
import org.aspectj.testing.util.TestUtil;
/**
- * This is a test case for all the portions of TypeX that don't require a world.
+ * This is a test case for all the portions of UnresolvedType that don't require a world.
*/
public class TypeXTestCase extends TestCase {
@@ -45,59 +45,59 @@ public class TypeXTestCase extends TestCase {
new boolean[] { true, true, false, false, false, false, true };
nameSignatureTest(testNames, testSigs);
- arrayTest(TypeX.forNames(testNames), componentNames);
- arrayTest(TypeX.forSignatures(testSigs), componentNames);
+ arrayTest(UnresolvedType.forNames(testNames), componentNames);
+ arrayTest(UnresolvedType.forSignatures(testSigs), componentNames);
- sizeTest(TypeX.forNames(testNames), sizes);
- sizeTest(TypeX.forSignatures(testSigs), sizes);
+ sizeTest(UnresolvedType.forNames(testNames), sizes);
+ sizeTest(UnresolvedType.forSignatures(testSigs), sizes);
- isPrimitiveTest(TypeX.forSignatures(testSigs), isPrimitive);
+ isPrimitiveTest(UnresolvedType.forSignatures(testSigs), isPrimitive);
}
public void testNameAndSigWithInners() {
- TypeX t = TypeX.forName("java.util.Map$Entry");
+ UnresolvedType t = UnresolvedType.forName("java.util.Map$Entry");
assertEquals(t.getName(), "java.util.Map$Entry");
assertEquals(t.getSignature(), "Ljava/util/Map$Entry;");
- assertEquals(t.getOutermostType(), TypeX.forName("java.util.Map"));
- assertEquals(TypeX.forName("java.util.Map").getOutermostType(), TypeX.forName("java.util.Map"));
+ assertEquals(t.getOutermostType(), UnresolvedType.forName("java.util.Map"));
+ assertEquals(UnresolvedType.forName("java.util.Map").getOutermostType(), UnresolvedType.forName("java.util.Map"));
}
public void testNameAndSigWithParameters() {
- TypeX t = TypeX.forName("java.util.List<java.lang.String>");
+ UnresolvedType t = UnresolvedType.forName("java.util.List<java.lang.String>");
assertEquals(t.getName(),"java.util.List<java.lang.String>");
assertEquals(t.getSignature(),"Ljava/util/List<Ljava/lang/String;>;");
- t = new TypeX("Ljava/util/List<Ljava/lang/String;>;");
+ t = new UnresolvedType("Ljava/util/List<Ljava/lang/String;>;");
assertEquals(t.getName(),"java.util.List<java.lang.String>");
assertEquals(t.getSignature(),"Ljava/util/List<Ljava/lang/String;>;");
- t = TypeX.forName("java.util.Map<java.util.String,java.util.List<java.lang.Integer>>");
+ t = UnresolvedType.forName("java.util.Map<java.util.String,java.util.List<java.lang.Integer>>");
assertEquals(t.getName(),"java.util.Map<java.util.String,java.util.List<java.lang.Integer>>");
assertEquals(t.getSignature(),"Ljava/util/Map<Ljava/util/String;Ljava/util/List<Ljava/lang/Integer;>;>;");
- t = new TypeX("Ljava/util/Map<Ljava/util/String;Ljava/util/List<Ljava/lang/Integer;>;>;");
+ t = new UnresolvedType("Ljava/util/Map<Ljava/util/String;Ljava/util/List<Ljava/lang/Integer;>;>;");
assertEquals(t.getName(),"java.util.Map<java.util.String,java.util.List<java.lang.Integer>>");
assertEquals(t.getSignature(),"Ljava/util/Map<Ljava/util/String;Ljava/util/List<Ljava/lang/Integer;>;>;");
}
/**
- * Verify TypeX signature processing creates the right kind of TypeX's from a signature.
+ * Verify UnresolvedType signature processing creates the right kind of UnresolvedType's from a signature.
*
- * For example, calling TypeX.dump() for
+ * For example, calling UnresolvedType.dump() for
* "Ljava/util/Map<Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;"
* results in:
- * TypeX: signature=Ljava/util/Map<Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>; parameterized=true #params=2
- * TypeX: signature=Ljava/util/List<Ljava/lang/String;>; parameterized=true #params=1
- * TypeX: signature=Ljava/lang/String; parameterized=false #params=0
- * TypeX: signature=Ljava/lang/String; parameterized=false #params=0
+ * UnresolvedType: signature=Ljava/util/Map<Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>; parameterized=true #params=2
+ * UnresolvedType: signature=Ljava/util/List<Ljava/lang/String;>; parameterized=true #params=1
+ * UnresolvedType: signature=Ljava/lang/String; parameterized=false #params=0
+ * UnresolvedType: signature=Ljava/lang/String; parameterized=false #params=0
*/
public void testTypexGenericSignatureProcessing() {
- TypeX tx = null;
+ UnresolvedType tx = null;
- tx = new TypeX("Ljava/util/Set<Ljava/lang/String;>;");
+ tx = new UnresolvedType("Ljava/util/Set<Ljava/lang/String;>;");
checkTX(tx,true,1);
- tx = new TypeX("Ljava/util/Set<Ljava/util/List<Ljava/lang/String;>;>;");
+ tx = new UnresolvedType("Ljava/util/Set<Ljava/util/List<Ljava/lang/String;>;>;");
checkTX(tx,true,1);
- tx = new TypeX("Ljava/util/Map<Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;");
+ tx = new UnresolvedType("Ljava/util/Map<Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;");
checkTX(tx,true,2);
checkTX(tx.getTypeParameters()[0],true,1);
checkTX(tx.getTypeParameters()[1],false,0);
@@ -105,18 +105,18 @@ public class TypeXTestCase extends TestCase {
}
public void testTypeXForParameterizedTypes() {
- TypeX stringType = TypeX.forName("java/lang/String");
- TypeX listOfStringType = TypeX.forParameterizedTypes(TypeX.forName("java/util/List"), new TypeX[] {stringType});
+ UnresolvedType stringType = UnresolvedType.forName("java/lang/String");
+ UnresolvedType listOfStringType = UnresolvedType.forParameterizedTypes(UnresolvedType.forName("java/util/List"), new UnresolvedType[] {stringType});
assertEquals("1 type param",1,listOfStringType.typeParameters.length);
assertEquals(stringType,listOfStringType.typeParameters[0]);
- assertTrue(listOfStringType.isParameterized());
- assertFalse(listOfStringType.isGeneric());
+ assertTrue(listOfStringType.isParameterizedType());
+ assertFalse(listOfStringType.isGenericType());
}
- private void checkTX(TypeX tx,boolean shouldBeParameterized,int numberOfTypeParameters) {
- assertTrue("Expected parameterization flag to be "+shouldBeParameterized,tx.isParameterized()==shouldBeParameterized);
+ private void checkTX(UnresolvedType tx,boolean shouldBeParameterized,int numberOfTypeParameters) {
+ assertTrue("Expected parameterization flag to be "+shouldBeParameterized,tx.isParameterizedType()==shouldBeParameterized);
if (numberOfTypeParameters==0) {
- TypeX[] params = tx.getTypeParameters();
+ UnresolvedType[] params = tx.getTypeParameters();
assertTrue("Expected 0 type parameters but found "+params.length,params==null || params.length==0);
} else {
assertTrue("Expected #type parameters to be "+numberOfTypeParameters,tx.getTypeParameters().length==numberOfTypeParameters);
@@ -124,25 +124,25 @@ public class TypeXTestCase extends TestCase {
}
- private void isPrimitiveTest(TypeX[] types, boolean[] isPrimitives) {
+ private void isPrimitiveTest(UnresolvedType[] types, boolean[] isPrimitives) {
for (int i = 0, len = types.length; i < len; i++) {
- TypeX type = types[i];
+ UnresolvedType type = types[i];
boolean b = isPrimitives[i];
- assertEquals(type + " is primitive: ", b, type.isPrimitive());
+ assertEquals(type + " is primitive: ", b, type.isPrimitiveType());
}
}
- private void sizeTest(TypeX[] types, int[] sizes) {
+ private void sizeTest(UnresolvedType[] types, int[] sizes) {
for (int i = 0, len = types.length; i < len; i++) {
- TypeX type = types[i];
+ UnresolvedType type = types[i];
int size = sizes[i];
assertEquals("size of " + type + ": ", size, type.getSize());
}
}
- private void arrayTest(TypeX[] types, String[] components) {
+ private void arrayTest(UnresolvedType[] types, String[] components) {
for (int i = 0, len = types.length; i < len; i++) {
- TypeX type = types[i];
+ UnresolvedType type = types[i];
String component = components[i];
assertEquals(type + " is array: ", component != null, type.isArray());
if (component != null)
@@ -155,8 +155,8 @@ public class TypeXTestCase extends TestCase {
for (int i = 0, len = ns.length; i < len; i++) {
String n = ns[i];
String s = ss[i];
- TypeX tn = TypeX.forName(n);
- TypeX ts = TypeX.forSignature(s);
+ UnresolvedType tn = UnresolvedType.forName(n);
+ UnresolvedType ts = UnresolvedType.forSignature(s);
assertEquals("forName(n).getName()", n,
tn.getName());
@@ -173,8 +173,8 @@ public class TypeXTestCase extends TestCase {
for (int j = 0; j < len; j++) {
if (i == j) continue;
- TypeX tn1 = TypeX.forName(ns[j]);
- TypeX ts1 = TypeX.forSignature(ss[j]);
+ UnresolvedType tn1 = UnresolvedType.forName(ns[j]);
+ UnresolvedType ts1 = UnresolvedType.forSignature(ss[j]);
TestUtil.assertCommutativeEquals(tn, tn1, false);
TestUtil.assertCommutativeEquals(ts, tn1, false);
TestUtil.assertCommutativeEquals(tn, ts1, false);
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/AfterThrowingWeaveTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/AfterThrowingWeaveTestCase.java
index 7b494a4bd..197da87e6 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/AfterThrowingWeaveTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/AfterThrowingWeaveTestCase.java
@@ -35,7 +35,7 @@ public class AfterThrowingWeaveTestCase extends WeaveTestCase {
ShadowMunger myMunger =
world.shadowMunger("afterThrowing(): get(* *.out) -> static void Aspect.ajc_afterThrowing_field_get(java.lang.Throwable)",
Advice.ExtraArgument);
- ShadowMunger cm = myMunger.concretize(ResolvedTypeX.MISSING, world, null);
+ ShadowMunger cm = myMunger.concretize(ResolvedType.MISSING, world, null);
weaveTest(getStandardTargets(), "AfterThrowingParam", cm);
}
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/ArgsWeaveTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/ArgsWeaveTestCase.java
index eb5c8b78e..c487d24d7 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/ArgsWeaveTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/ArgsWeaveTestCase.java
@@ -24,9 +24,9 @@ import org.aspectj.apache.bcel.generic.InstructionList;
import org.aspectj.apache.bcel.generic.Type;
import org.aspectj.weaver.AdviceKind;
import org.aspectj.weaver.Member;
-import org.aspectj.weaver.ResolvedTypeX;
+import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.Shadow;
-import org.aspectj.weaver.TypeX;
+import org.aspectj.weaver.UnresolvedType;
/**.
*/
@@ -100,10 +100,10 @@ public class ArgsWeaveTestCase extends WeaveTestCase {
}
private BcelAdvice makeArgsMunger(final String kindx) {
- ResolvedTypeX rtx = world.resolve(TypeX.forName("Aspect"),true);
- assertTrue("Cant find required type Aspect",rtx!=ResolvedTypeX.MISSING);
+ ResolvedType rtx = world.resolve(UnresolvedType.forName("Aspect"),true);
+ assertTrue("Cant find required type Aspect",rtx!=ResolvedType.MISSING);
return new BcelAdvice(AdviceKind.stringToKind(kindx), makePointcutNoZeroArg(),
- Member.method(TypeX.forName("Aspect"), 0, "foo", "()V"), 0, -1, -1, null,
+ Member.method(UnresolvedType.forName("Aspect"), 0, "foo", "()V"), 0, -1, -1, null,
rtx) {
public void specializeOn(Shadow shadow) {
super.specializeOn(shadow);
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/AroundWeaveTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/AroundWeaveTestCase.java
index 983acc4a9..023005e53 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/AroundWeaveTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/AroundWeaveTestCase.java
@@ -49,7 +49,7 @@ public class AroundWeaveTestCase extends WeaveTestCase {
BcelWorld world = super.world;
final Member sig =
Member.method(
- TypeX.forName("Aspect"),
+ UnresolvedType.forName("Aspect"),
Modifier.STATIC,
"ajc_around",
"(Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object;");
@@ -57,7 +57,7 @@ public class AroundWeaveTestCase extends WeaveTestCase {
return new BcelAdvice(
AdviceKind.stringToKind("around"),
matchOnlyPrintln ? makePointcutPrintln() : makePointcutAll(),
- sig, 0, -1, -1, null, TypeX.forName("Aspect").resolve(world))
+ sig, 0, -1, -1, null, UnresolvedType.forName("Aspect").resolve(world))
{
public void specializeOn(Shadow s) {
super.specializeOn(s);
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/BcelGenericSignatureToTypeXTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/BcelGenericSignatureToTypeXTestCase.java
index 124008e45..d42e769d2 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/BcelGenericSignatureToTypeXTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/BcelGenericSignatureToTypeXTestCase.java
@@ -11,13 +11,15 @@
* ******************************************************************/
package org.aspectj.weaver.bcel;
-import junit.framework.TestCase;
-
import org.aspectj.apache.bcel.Repository;
import org.aspectj.apache.bcel.classfile.GenericSignatureParser;
import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.classfile.Signature;
-import org.aspectj.weaver.TypeX;
+import org.aspectj.weaver.ResolvedType;
+import org.aspectj.weaver.TypeVariable;
+import org.aspectj.weaver.UnresolvedType;
+
+import junit.framework.TestCase;
/**
* @author colyer
@@ -29,7 +31,7 @@ public class BcelGenericSignatureToTypeXTestCase extends TestCase {
BcelWorld world = new BcelWorld();
JavaClass javaLangEnum = Repository.lookupClass("java/lang/Enum");
Signature.ClassSignature cSig = javaLangEnum.getGenericClassTypeSignature();
- TypeX superclass =
+ UnresolvedType superclass =
BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
cSig.superclassSignature,
cSig.formalTypeParameters,
@@ -37,14 +39,14 @@ public class BcelGenericSignatureToTypeXTestCase extends TestCase {
);
assertEquals("Ljava/lang/Object;",superclass.getSignature());
assertEquals("2 superinterfaces",2,cSig.superInterfaceSignatures.length);
- TypeX comparable =
+ UnresolvedType comparable =
BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
cSig.superInterfaceSignatures[0],
cSig.formalTypeParameters,
world
);
assertEquals("Ljava/lang/Comparable<Ljava/lang/Enum<Ljava/lang/Object;>;>;",comparable.getSignature());
- TypeX serializable =
+ UnresolvedType serializable =
BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
cSig.superInterfaceSignatures[1],
cSig.formalTypeParameters,
@@ -56,12 +58,12 @@ public class BcelGenericSignatureToTypeXTestCase extends TestCase {
public void testColonColon() {
BcelWorld world = new BcelWorld();
Signature.ClassSignature cSig = new GenericSignatureParser().parseAsClassSignature("<T::Ljava/io/Serializable;>Ljava/lang/Object;Ljava/lang/Comparable<TT;>;");
- TypeX resolved = BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
+ UnresolvedType resolved = BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
cSig.superclassSignature,
cSig.formalTypeParameters,
world);
assertEquals("Ljava/lang/Object;",resolved.getSignature());
- TypeX resolvedInt = BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
+ UnresolvedType resolvedInt = BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(
cSig.superInterfaceSignatures[0],
cSig.formalTypeParameters,
world);
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/HierarchyDependsTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/HierarchyDependsTestCase.java
index 6bf632ca3..4c0dff632 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/HierarchyDependsTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/HierarchyDependsTestCase.java
@@ -29,10 +29,10 @@ public class HierarchyDependsTestCase extends TestCase {
public void testHierarchyDepends() {
BcelWorld world = new BcelWorld();
TypePatternQuestions questions = new TypePatternQuestions();
- ResolvedTypeX runnableType = world.resolve("java.lang.Runnable");
- ResolvedTypeX numberType = world.resolve("java.lang.Number");
- ResolvedTypeX integerType = world.resolve("java.lang.Integer");
- ResolvedTypeX stringType = world.resolve("java.lang.String");
+ ResolvedType runnableType = world.resolve("java.lang.Runnable");
+ ResolvedType numberType = world.resolve("java.lang.Number");
+ ResolvedType integerType = world.resolve("java.lang.Integer");
+ ResolvedType stringType = world.resolve("java.lang.String");
TypePattern numberPattern = new ExactTypePattern(numberType, false);
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/MegaZipTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/MegaZipTestCase.java
index 121951617..ac57a0ba7 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/MegaZipTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/MegaZipTestCase.java
@@ -23,7 +23,7 @@ import org.aspectj.weaver.AdviceKind;
import org.aspectj.weaver.BcweaverTests;
import org.aspectj.weaver.Member;
import org.aspectj.weaver.Shadow;
-import org.aspectj.weaver.TypeX;
+import org.aspectj.weaver.UnresolvedType;
public class MegaZipTestCase extends WeaveTestCase {
@@ -47,7 +47,7 @@ public class MegaZipTestCase extends WeaveTestCase {
// BcelWorld world = new BcelWorld();
final Member sig =
Member.method(
- TypeX.forName("fluffy.Aspect"),
+ UnresolvedType.forName("fluffy.Aspect"),
Modifier.STATIC,
"aroundFun",
"(Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object;");
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/NonstaticWeaveTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/NonstaticWeaveTestCase.java
index c98c8e687..0a35627de 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/NonstaticWeaveTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/NonstaticWeaveTestCase.java
@@ -44,7 +44,7 @@ public class NonstaticWeaveTestCase extends WeaveTestCase {
PerClause per = new PatternParser("percflow(execution(void main(..)))").maybeParsePerClause();
per.resolve(new TestScope(new String[0], new String[0], world));
- ResolvedTypeX onAspect = world.resolve("Aspect");
+ ResolvedType onAspect = world.resolve("Aspect");
CrosscuttingMembers xcut = new CrosscuttingMembers(onAspect);
onAspect.crosscuttingMembers = xcut;
@@ -63,7 +63,7 @@ public class NonstaticWeaveTestCase extends WeaveTestCase {
PerClause per = new PatternParser("pertarget(call(* println(..)))").maybeParsePerClause();
per.resolve(new TestScope(new String[0], new String[0], world));
- ResolvedTypeX onAspect = world.resolve("Aspect");
+ ResolvedType onAspect = world.resolve("Aspect");
CrosscuttingMembers xcut = new CrosscuttingMembers(onAspect);
onAspect.crosscuttingMembers = xcut;
per = per.concretize(onAspect);
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java
index 31560fa90..7a2a6f0e6 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/PatternWeaveTestCase.java
@@ -80,7 +80,7 @@ public class PatternWeaveTestCase extends WeaveTestCase {
{
Pointcut sp = Pointcut.fromString(pointcutSource);
Pointcut rp = sp.resolve(new SimpleScope(world, FormalBinding.NONE));
- Pointcut cp = rp.concretize(ResolvedTypeX.MISSING, 0);
+ Pointcut cp = rp.concretize(ResolvedType.MISSING, 0);
final List l = new ArrayList();
BcelAdvice p = new BcelAdvice(null, cp, null, 0, -1, -1, null, null) {
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/PointcutResidueTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/PointcutResidueTestCase.java
index 0f5178c0e..428ab5ed2 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/PointcutResidueTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/PointcutResidueTestCase.java
@@ -178,7 +178,7 @@ public class PointcutResidueTestCase extends WeaveTestCase {
sp.resolve(
new SimpleScope(
world,
- SimpleScope.makeFormalBindings(TypeX.forNames(formalTypes),
+ SimpleScope.makeFormalBindings(UnresolvedType.forNames(formalTypes),
formalNames)
));
@@ -187,15 +187,15 @@ public class PointcutResidueTestCase extends WeaveTestCase {
AdviceKind.Before,
rp,
Member.method(
- TypeX.forName("Aspect"),
+ UnresolvedType.forName("Aspect"),
Modifier.STATIC,
"ajc_before_0",
Member.typesToSignature(
- ResolvedTypeX.VOID,
- TypeX.forNames(formalTypes),false)),
+ ResolvedType.VOID,
+ UnresolvedType.forNames(formalTypes),false)),
0, -1, -1, null, null);
- ResolvedTypeX inAspect = world.resolve("Aspect");
+ ResolvedType inAspect = world.resolve("Aspect");
CrosscuttingMembers xcut = new CrosscuttingMembers(inAspect);
inAspect.crosscuttingMembers = xcut;
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/TjpWeaveTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/TjpWeaveTestCase.java
index 32aa909dd..4fe362973 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/TjpWeaveTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/TjpWeaveTestCase.java
@@ -19,8 +19,8 @@ import java.util.Arrays;
import org.aspectj.weaver.Advice;
import org.aspectj.weaver.AdviceKind;
import org.aspectj.weaver.Member;
-import org.aspectj.weaver.ResolvedTypeX;
-import org.aspectj.weaver.TypeX;
+import org.aspectj.weaver.ResolvedType;
+import org.aspectj.weaver.UnresolvedType;
public class TjpWeaveTestCase extends WeaveTestCase {
{
@@ -75,8 +75,8 @@ public class TjpWeaveTestCase extends WeaveTestCase {
}
public void testAround2Tjp() throws IOException {
- ResolvedTypeX rtx = world.resolve(TypeX.forName("Aspect"),true);
- assertTrue("Couldnt find type Aspect",rtx!=ResolvedTypeX.MISSING);
+ ResolvedType rtx = world.resolve(UnresolvedType.forName("Aspect"),true);
+ assertTrue("Couldnt find type Aspect",rtx!=ResolvedType.MISSING);
BcelAdvice munger1 = new BcelAdvice(
AdviceKind.stringToKind("around"),
makePointcutAll(),
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/WeaveOrderTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/WeaveOrderTestCase.java
index 1b7f1285f..5696a1df5 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/WeaveOrderTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/WeaveOrderTestCase.java
@@ -30,9 +30,9 @@ public class WeaveOrderTestCase extends WeaveTestCase {
public void testLexicalOrder() {
Advice a1 =
- makeConcreteAdvice(AdviceKind.Before, TypeX.OBJECT, TypeX.OBJECT, 1);
+ makeConcreteAdvice(AdviceKind.Before, UnresolvedType.OBJECT, UnresolvedType.OBJECT, 1);
Advice a2 =
- makeConcreteAdvice(AdviceKind.Before, TypeX.OBJECT, TypeX.THROWABLE, 2);
+ makeConcreteAdvice(AdviceKind.Before, UnresolvedType.OBJECT, UnresolvedType.THROWABLE, 2);
assertEquals(-1, a2.compareTo(a1));
assertEquals(+1, a1.compareTo(a2));
@@ -40,17 +40,17 @@ public class WeaveOrderTestCase extends WeaveTestCase {
public void testLexicalOrderWithAfter() {
Advice a1 =
- makeConcreteAdvice(AdviceKind.Before, TypeX.OBJECT, TypeX.OBJECT, 1);
+ makeConcreteAdvice(AdviceKind.Before, UnresolvedType.OBJECT, UnresolvedType.OBJECT, 1);
Advice a2 =
- makeConcreteAdvice(AdviceKind.After, TypeX.OBJECT, TypeX.THROWABLE, 2);
+ makeConcreteAdvice(AdviceKind.After, UnresolvedType.OBJECT, UnresolvedType.THROWABLE, 2);
assertEquals(+1, a2.compareTo(a1));
assertEquals(-1, a1.compareTo(a2));
a1 =
- makeConcreteAdvice(AdviceKind.After, TypeX.OBJECT, TypeX.OBJECT, 1);
+ makeConcreteAdvice(AdviceKind.After, UnresolvedType.OBJECT, UnresolvedType.OBJECT, 1);
a2 =
- makeConcreteAdvice(AdviceKind.After, TypeX.OBJECT, TypeX.THROWABLE, 2);
+ makeConcreteAdvice(AdviceKind.After, UnresolvedType.OBJECT, UnresolvedType.THROWABLE, 2);
assertEquals(+1, a2.compareTo(a1));
assertEquals(-1, a1.compareTo(a2));
@@ -58,11 +58,11 @@ public class WeaveOrderTestCase extends WeaveTestCase {
public void testSubtypes() {
Advice a1 =
- makeConcreteAdvice(AdviceKind.Before, TypeX.OBJECT, TypeX.OBJECT, 1);
+ makeConcreteAdvice(AdviceKind.Before, UnresolvedType.OBJECT, UnresolvedType.OBJECT, 1);
Advice a2 =
- makeConcreteAdvice(AdviceKind.Before, TypeX.THROWABLE, TypeX.OBJECT, 1);
+ makeConcreteAdvice(AdviceKind.Before, UnresolvedType.THROWABLE, UnresolvedType.OBJECT, 1);
Advice a3 =
- makeConcreteAdvice(AdviceKind.Before, TypeX.forName("java.lang.String"), TypeX.OBJECT, 1);
+ makeConcreteAdvice(AdviceKind.Before, UnresolvedType.forName("java.lang.String"), UnresolvedType.OBJECT, 1);
assertEquals(+1, a2.compareTo(a1));
assertEquals(-1, a1.compareTo(a2));
@@ -79,18 +79,18 @@ public class WeaveOrderTestCase extends WeaveTestCase {
Declare dom =
new PatternParser("declare precedence: java.lang.String, java.lang.Throwable").parseDeclare();
//??? concretize dom
- ResolvedTypeX aType = world.resolve("Aspect");
+ ResolvedType aType = world.resolve("Aspect");
CrosscuttingMembers xcut = new CrosscuttingMembers(aType);
aType.crosscuttingMembers = xcut;
xcut.addDeclare(dom);
world.getCrosscuttingMembersSet().addFixedCrosscuttingMembers(aType);
Advice a1 =
- makeConcreteAdvice(AdviceKind.Before, TypeX.OBJECT, TypeX.OBJECT, 1);
+ makeConcreteAdvice(AdviceKind.Before, UnresolvedType.OBJECT, UnresolvedType.OBJECT, 1);
Advice a2 =
- makeConcreteAdvice(AdviceKind.Before, TypeX.OBJECT, TypeX.THROWABLE, 2);
+ makeConcreteAdvice(AdviceKind.Before, UnresolvedType.OBJECT, UnresolvedType.THROWABLE, 2);
Advice a3 =
- makeConcreteAdvice(AdviceKind.Before, TypeX.OBJECT, TypeX.forName("java.lang.String"), 2);
+ makeConcreteAdvice(AdviceKind.Before, UnresolvedType.OBJECT, UnresolvedType.forName("java.lang.String"), 2);
assertEquals(-1, a2.compareTo(a1));
assertEquals(+1, a1.compareTo(a2));
@@ -107,18 +107,18 @@ public class WeaveOrderTestCase extends WeaveTestCase {
Declare dom =
new PatternParser("declare precedence: *, java.lang.String, java.lang.Throwable").parseDeclare();
//??? concretize dom
- ResolvedTypeX aType = world.resolve("Aspect");
+ ResolvedType aType = world.resolve("Aspect");
CrosscuttingMembers xcut = new CrosscuttingMembers(aType);
aType.crosscuttingMembers = xcut;
xcut.addDeclare(dom);
world.getCrosscuttingMembersSet().addFixedCrosscuttingMembers(aType);
Advice a1 =
- makeConcreteAdvice(AdviceKind.Before, TypeX.OBJECT, TypeX.OBJECT, 2);
+ makeConcreteAdvice(AdviceKind.Before, UnresolvedType.OBJECT, UnresolvedType.OBJECT, 2);
Advice a2 =
- makeConcreteAdvice(AdviceKind.Before, TypeX.OBJECT, TypeX.THROWABLE, 1);
+ makeConcreteAdvice(AdviceKind.Before, UnresolvedType.OBJECT, UnresolvedType.THROWABLE, 1);
Advice a3 =
- makeConcreteAdvice(AdviceKind.Before, TypeX.OBJECT, TypeX.forName("java.lang.String"), 1);
+ makeConcreteAdvice(AdviceKind.Before, UnresolvedType.OBJECT, UnresolvedType.forName("java.lang.String"), 1);
assertEquals(-1, a2.compareTo(a1));
assertEquals(+1, a1.compareTo(a2));
@@ -134,8 +134,8 @@ public class WeaveOrderTestCase extends WeaveTestCase {
- private Advice makeConcreteAdvice(AdviceKind kind, TypeX declaringAspect,
- TypeX concreteAspect, int lexicalPosition)
+ private Advice makeConcreteAdvice(AdviceKind kind, UnresolvedType declaringAspect,
+ UnresolvedType concreteAspect, int lexicalPosition)
{
Advice a1 = new BcelAdvice(kind, makeResolvedPointcut("this(*)"),
Member.method(declaringAspect, 0, "foo", "()V"),
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/WorldTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/WorldTestCase.java
index 1e4eabd5e..494999562 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/WorldTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/WorldTestCase.java
@@ -35,15 +35,15 @@ public class WorldTestCase extends AbstractWorldTestCase {
// XXX fix the various XXXs before expecting this test to work
public void xtestTraceJar() {
- ResolvedTypeX trace = world.resolve(TypeX.forName("Trace"),true);
- assertTrue("Couldnt find type Trace",trace!=ResolvedTypeX.MISSING);
+ ResolvedType trace = world.resolve(UnresolvedType.forName("Trace"),true);
+ assertTrue("Couldnt find type Trace",trace!=ResolvedType.MISSING);
fieldsTest(trace, Member.NONE);
/*Member constr = */Member.methodFromString("void Trace.<init>()");
//XXX need attribute fix -
//methodsTest(trace, new Member[] { constr });
- interfacesTest(trace, ResolvedTypeX.NONE);
- superclassTest(trace, TypeX.OBJECT);
+ interfacesTest(trace, ResolvedType.NONE);
+ superclassTest(trace, UnresolvedType.OBJECT);
isInterfaceTest(trace, false);
isClassTest(trace, false);
isAspectTest(trace, true);
@@ -68,10 +68,10 @@ public class WorldTestCase extends AbstractWorldTestCase {
Advice.ExtraArgument),
});
- ResolvedTypeX myTrace = world.resolve(TypeX.forName("MyTrace"),true);
- assertTrue("Couldnt find type MyTrace",myTrace!=ResolvedTypeX.MISSING);
+ ResolvedType myTrace = world.resolve(UnresolvedType.forName("MyTrace"),true);
+ assertTrue("Couldnt find type MyTrace",myTrace!=ResolvedType.MISSING);
- interfacesTest(myTrace, ResolvedTypeX.NONE);
+ interfacesTest(myTrace, ResolvedType.NONE);
superclassTest(myTrace, trace);
isInterfaceTest(myTrace, false);
isClassTest(myTrace, false);
@@ -96,7 +96,7 @@ public class WorldTestCase extends AbstractWorldTestCase {
public void testIterator() {
int abstractPublic = Modifier.ABSTRACT | Modifier.PUBLIC;
- ResolvedTypeX iter = world.getCoreType(TypeX.forRawTypeNames("java.util.Iterator"));
+ ResolvedType iter = world.getCoreType(UnresolvedType.forRawTypeNames("java.util.Iterator"));
modifiersTest(iter, abstractPublic | Modifier.INTERFACE);
fieldsTest(iter, ResolvedMember.NONE);
@@ -109,15 +109,15 @@ public class WorldTestCase extends AbstractWorldTestCase {
ResolvedMember remove = iter.lookupMethod(Member.method(iter, 0, "remove", "()V"));
assertNotNull("iterator doesn't have remove" , remove);
modifiersTest(remove, abstractPublic | Modifier.INTERFACE);
- exceptionsTest(remove, TypeX.NONE);
+ exceptionsTest(remove, UnresolvedType.NONE);
- ResolvedMember clone = iter.lookupMethod(Member.method(TypeX.OBJECT, 0, "clone", "()Ljava/lang/Object;"));
+ ResolvedMember clone = iter.lookupMethod(Member.method(UnresolvedType.OBJECT, 0, "clone", "()Ljava/lang/Object;"));
assertNotNull("iterator doesn't have clone" , clone);
modifiersTest(clone, Modifier.PROTECTED | Modifier.NATIVE);
- exceptionsTest(clone, TypeX.forNames(new String[] {"java.lang.CloneNotSupportedException"}));
+ exceptionsTest(clone, UnresolvedType.forNames(new String[] {"java.lang.CloneNotSupportedException"}));
- interfacesTest(iter, ResolvedTypeX.NONE);
- superclassTest(iter, TypeX.OBJECT);
+ interfacesTest(iter, ResolvedType.NONE);
+ superclassTest(iter, UnresolvedType.OBJECT);
pointcutsTest(iter, ResolvedMember.NONE);
mungersTest(iter, ShadowMunger.NONE);
isInterfaceTest(iter, true);
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternMatchingTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternMatchingTestCase.java
index 37506ad48..bdf27dff3 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternMatchingTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternMatchingTestCase.java
@@ -23,7 +23,7 @@ import org.aspectj.bridge.IMessage.Kind;
import org.aspectj.util.LangUtil;
import org.aspectj.weaver.BcweaverTests;
import org.aspectj.weaver.ResolvedMember;
-import org.aspectj.weaver.ResolvedTypeX;
+import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.bcel.BcelWorld;
/*
@@ -62,7 +62,7 @@ public class AnnotationPatternMatchingTestCase extends TestCase {
private BcelWorld world;
private AnnotationTypePattern fooTP,simpleAnnotationTP;
- private ResolvedTypeX loadType(String name) {
+ private ResolvedType loadType(String name) {
if (world == null) {
world = new BcelWorld(BcweaverTests.TESTDATA_PATH + "/testcode.jar");
}
@@ -82,7 +82,7 @@ public class AnnotationPatternMatchingTestCase extends TestCase {
public void testAnnotationPatternMatchingOnTypes() {
if (LangUtil.is15VMOrGreater()) {
- ResolvedTypeX rtx = loadType("AnnotatedClass");
+ ResolvedType rtx = loadType("AnnotatedClass");
initAnnotationTypePatterns();
// One should match
@@ -105,7 +105,7 @@ public class AnnotationPatternMatchingTestCase extends TestCase {
}
public void testReferenceToNonAnnotationType() {
- ResolvedTypeX rtx = loadType("AnnotatedClass"); // inits the world
+ ResolvedType rtx = loadType("AnnotatedClass"); // inits the world
PatternParser p = new PatternParser("@java.lang.String");
MyMessageHandler mh = new MyMessageHandler();
@@ -121,7 +121,7 @@ public class AnnotationPatternMatchingTestCase extends TestCase {
}
public void testReferenceViaFormalToNonAnnotationType() {
- ResolvedTypeX rtx = loadType("AnnotatedClass"); // inits the world
+ ResolvedType rtx = loadType("AnnotatedClass"); // inits the world
PatternParser p = new PatternParser("a");
MyMessageHandler mh = new MyMessageHandler();
@@ -145,7 +145,7 @@ public class AnnotationPatternMatchingTestCase extends TestCase {
}
public void testUnresolvedAnnotationTypes() {
- ResolvedTypeX rtx = loadType("AnnotatedClass");
+ ResolvedType rtx = loadType("AnnotatedClass");
PatternParser p = new PatternParser("@Foo");
AnnotationTypePattern fooTP = p.maybeParseAnnotationPattern();
@@ -159,7 +159,7 @@ public class AnnotationPatternMatchingTestCase extends TestCase {
public void testAnnotationPatternMatchingOnMethods() {
if (LangUtil.is15VMOrGreater()) {
- ResolvedTypeX rtx = loadType("AnnotatedClass");
+ ResolvedType rtx = loadType("AnnotatedClass");
ResolvedMember aMethod = rtx.getDeclaredMethods()[1];
assertTrue("Haven't got the right method, I'm looking for 'm1()': "+aMethod.getName(),
@@ -177,7 +177,7 @@ public class AnnotationPatternMatchingTestCase extends TestCase {
public void testAnnotationPatternMatchingOnFields() {
if (LangUtil.is15VMOrGreater()) {
- ResolvedTypeX rtx = loadType("AnnotatedClass");
+ ResolvedType rtx = loadType("AnnotatedClass");
ResolvedMember aField = rtx.getDeclaredFields()[0];
assertTrue("Haven't got the right field, I'm looking for 'i'"+aField.getName(),
@@ -195,8 +195,8 @@ public class AnnotationPatternMatchingTestCase extends TestCase {
}
public void testAnnotationTypeResolutionOnTypes() {
- ResolvedTypeX rtx = loadType("AnnotatedClass");
- ResolvedTypeX[] types = rtx.getAnnotationTypes();
+ ResolvedType rtx = loadType("AnnotatedClass");
+ ResolvedType[] types = rtx.getAnnotationTypes();
assertTrue("Did not expect null",types!=null);
assertTrue("Expected 1 entry but got "+types.length,types.length==1);
assertTrue("Should be 'p.SimpleAnnotation' but is "+types[0],
@@ -204,13 +204,13 @@ public class AnnotationPatternMatchingTestCase extends TestCase {
}
public void testAnnotationTypeResolutionOnMethods() {
- ResolvedTypeX rtx = loadType("AnnotatedClass");
+ ResolvedType rtx = loadType("AnnotatedClass");
ResolvedMember aMethod = rtx.getDeclaredMethods()[1];
assertTrue("Haven't got the right method, I'm looking for 'm1()': "+aMethod.getName(),
aMethod.getName().equals("m1"));
- ResolvedTypeX[] types = aMethod.getAnnotationTypes();
+ ResolvedType[] types = aMethod.getAnnotationTypes();
assertTrue("Did not expect null",types!=null);
assertTrue("Expected 1 entry but got "+types.length,types.length==1);
assertTrue("Should be 'p.SimpleAnnotation' but is "+types[0],
@@ -218,14 +218,14 @@ public class AnnotationPatternMatchingTestCase extends TestCase {
}
public void testAnnotationTypeResolutionOnFields() {
- ResolvedTypeX rtx = loadType("AnnotatedClass");
+ ResolvedType rtx = loadType("AnnotatedClass");
ResolvedMember aField = rtx.getDeclaredFields()[0];
assertTrue("Haven't got the right field, I'm looking for 'i'"+aField.getName(),
aField.getName().equals("i"));
- ResolvedTypeX[] types = aField.getAnnotationTypes();
+ ResolvedType[] types = aField.getAnnotationTypes();
assertTrue("Did not expect null",types!=null);
assertTrue("Expected 1 entry but got "+types.length,types.length==1);
assertTrue("Should be 'p.SimpleAnnotation' but is "+types[0],
@@ -234,7 +234,7 @@ public class AnnotationPatternMatchingTestCase extends TestCase {
public void testWildPatternMatchingOnTypes() {
- ResolvedTypeX rtx = loadType("AnnotatedClass");
+ ResolvedType rtx = loadType("AnnotatedClass");
initAnnotationTypePatterns();
// Let's create something wild
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java
index 7697b43d7..d681b638f 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/AnnotationPatternTestCase.java
@@ -12,9 +12,9 @@ package org.aspectj.weaver.patterns;
import org.aspectj.bridge.AbortException;
import org.aspectj.util.LangUtil;
import org.aspectj.weaver.AnnotatedElement;
-import org.aspectj.weaver.ResolvedTypeX;
+import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.BcweaverTests;
-import org.aspectj.weaver.TypeX;
+import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.bcel.BcelWorld;
import junit.framework.TestCase;
@@ -28,7 +28,7 @@ public class AnnotationPatternTestCase extends TestCase {
AnnotationTypePattern foo = p.maybeParseAnnotationPattern();
foo = foo.resolveBindings(makeSimpleScope(),new Bindings(3),true);
assertTrue("ExactAnnotationTypePattern",foo instanceof ExactAnnotationTypePattern);
- assertEquals("Foo",TypeX.forName("Foo"),((ExactAnnotationTypePattern)foo).annotationType);
+ assertEquals("Foo",UnresolvedType.forName("Foo"),((ExactAnnotationTypePattern)foo).annotationType);
}
public void testParseAndAnnotationPattern() {
@@ -40,8 +40,8 @@ public class AnnotationPatternTestCase extends TestCase {
assertEquals("@Foo @Goo",fooAndGoo.toString());
AnnotationTypePattern left = ((AndAnnotationTypePattern)fooAndGoo).getLeft();
AnnotationTypePattern right = ((AndAnnotationTypePattern)fooAndGoo).getRight();
- assertEquals("Foo",TypeX.forName("Foo"),((ExactAnnotationTypePattern)left).annotationType);
- assertEquals("Goo",TypeX.forName("Goo"),((ExactAnnotationTypePattern)right).annotationType);
+ assertEquals("Foo",UnresolvedType.forName("Foo"),((ExactAnnotationTypePattern)left).annotationType);
+ assertEquals("Goo",UnresolvedType.forName("Goo"),((ExactAnnotationTypePattern)right).annotationType);
}
//
// public void testParseOrAnnotationPattern() {
@@ -51,8 +51,8 @@ public class AnnotationPatternTestCase extends TestCase {
// assertEquals("(@Foo || @Goo)",fooOrGoo.toString());
// AnnotationTypePattern left = ((OrAnnotationTypePattern)fooOrGoo).getLeft();
// AnnotationTypePattern right = ((OrAnnotationTypePattern)fooOrGoo).getRight();
-// assertEquals("Foo",TypeX.forName("Foo"),((ExactAnnotationTypePattern)left).annotationType);
-// assertEquals("Goo",TypeX.forName("Goo"),((ExactAnnotationTypePattern)right).annotationType);
+// assertEquals("Foo",UnresolvedType.forName("Foo"),((ExactAnnotationTypePattern)left).annotationType);
+// assertEquals("Goo",UnresolvedType.forName("Goo"),((ExactAnnotationTypePattern)right).annotationType);
// }
//
public void testParseNotAnnotationPattern() {
@@ -62,7 +62,7 @@ public class AnnotationPatternTestCase extends TestCase {
notFoo = notFoo.resolveBindings(makeSimpleScope(),new Bindings(3),true);
assertEquals("!@Foo",notFoo.toString());
AnnotationTypePattern body = ((NotAnnotationTypePattern)notFoo).getNegatedPattern();
- assertEquals("Foo",TypeX.forName("Foo"),((ExactAnnotationTypePattern)body).annotationType);
+ assertEquals("Foo",UnresolvedType.forName("Foo"),((ExactAnnotationTypePattern)body).annotationType);
}
public void testParseBracketedAnnotationPattern() {
@@ -116,7 +116,7 @@ public class AnnotationPatternTestCase extends TestCase {
PatternParser p = new PatternParser("Foo");
AnnotationTypePattern foo = p.parseAnnotationNameOrVarTypePattern();
assertTrue("ExactAnnotationTypePattern",foo instanceof ExactAnnotationTypePattern);
- assertEquals("Foo",TypeX.forName("Foo"),((ExactAnnotationTypePattern)foo).annotationType);
+ assertEquals("Foo",UnresolvedType.forName("Foo"),((ExactAnnotationTypePattern)foo).annotationType);
}
public void testParseNameOrVarAnnotationPatternWithNot() {
@@ -134,7 +134,7 @@ public class AnnotationPatternTestCase extends TestCase {
AnnotationTypePattern foo = p.parseAnnotationNameOrVarTypePattern();
// rest of pattern not consumed...
assertTrue("ExactAnnotationTypePattern",foo instanceof ExactAnnotationTypePattern);
- assertEquals("Foo",TypeX.forName("Foo"),((ExactAnnotationTypePattern)foo).annotationType);
+ assertEquals("Foo",UnresolvedType.forName("Foo"),((ExactAnnotationTypePattern)foo).annotationType);
}
public void testParseNameOrVarAnnotationWithBinding() {
@@ -339,7 +339,7 @@ public class AnnotationPatternTestCase extends TestCase {
this.annotationTypes = annotationTypes;
}
- public boolean hasAnnotation(TypeX ofType) {
+ public boolean hasAnnotation(UnresolvedType ofType) {
for (int i = 0; i < annotationTypes.length; i++) {
if (annotationTypes[i].equals(ofType.getName())) return true;
}
@@ -349,7 +349,7 @@ public class AnnotationPatternTestCase extends TestCase {
/* (non-Javadoc)
* @see org.aspectj.weaver.AnnotatedElement#getAnnotationTypes()
*/
- public ResolvedTypeX[] getAnnotationTypes() {
+ public ResolvedType[] getAnnotationTypes() {
// TODO Auto-generated method stub
return null;
}
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/ConcretizationTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/ConcretizationTestCase.java
index e087ac858..63c25464f 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/ConcretizationTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/ConcretizationTestCase.java
@@ -13,7 +13,7 @@
package org.aspectj.weaver.patterns;
-import org.aspectj.weaver.TypeX;
+import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.bcel.WeaveTestCase;
public class ConcretizationTestCase extends WeaveTestCase {
@@ -36,7 +36,7 @@ public class ConcretizationTestCase extends WeaveTestCase {
TestShadow shadow = new TestShadow(Shadow.MethodCall,
Member.methodFromString("int Aspect.i(int x)"),
- TypeX.OBJECT,
+ UnresolvedType.OBJECT,
world);
ExposedState state = new ExposedState(1);
@@ -66,10 +66,10 @@ public class ConcretizationTestCase extends WeaveTestCase {
ResolvedPointcutDefinition ref =
new ResolvedPointcutDefinition(
- TypeX.forName("Aspect"),
+ UnresolvedType.forName("Aspect"),
0,
"foo",
- new TypeX[] { ResolvedTypeX.INT },
+ new UnresolvedType[] { ResolvedType.INT },
createResolvedPointcut(
"args(refA)",
new String[] { "refA" },
@@ -86,7 +86,7 @@ public class ConcretizationTestCase extends WeaveTestCase {
new BcelAdvice(
AdviceKind.Before,
in,
- Member.method(TypeX.forName("FOO"), 0, "garadf", "(FI)V"),
+ Member.method(UnresolvedType.forName("FOO"), 0, "garadf", "(FI)V"),
0,
0, 0, null,
null);
@@ -105,13 +105,13 @@ public class ConcretizationTestCase extends WeaveTestCase {
new String[] {"b", "a"}, new String[] {"float", "int"} );
ResolvedPointcutDefinition ref =
- new ResolvedPointcutDefinition(TypeX.forName("Aspect"),
- 0, "foo", new TypeX[] { ResolvedTypeX.INT },
+ new ResolvedPointcutDefinition(UnresolvedType.forName("Aspect"),
+ 0, "foo", new UnresolvedType[] { ResolvedType.INT },
createResolvedPointcut("args(refA)",
new String[] {"refA"}, new String[] {"int"}));
List expectedSlots = new ArrayList();
- expectedSlots.add(new ConcreteCflowPointcut.Slot(1, ResolvedTypeX.INT, 0));
+ expectedSlots.add(new ConcreteCflowPointcut.Slot(1, ResolvedType.INT, 0));
checkConcr(in, ref, expectedSlots);
}
@@ -129,7 +129,7 @@ public class ConcretizationTestCase extends WeaveTestCase {
Advice adviceMember = new BcelAdvice(AdviceKind.Before, in,
- Member.method(TypeX.forName("FOO"), 0, "garadf", "(FI)V"), 0, 0, 0, null, null);
+ Member.method(UnresolvedType.forName("FOO"), 0, "garadf", "(FI)V"), 0, 0, 0, null, null);
// The pointcut to concretize
AndPointcut ap = (AndPointcut)in.concretize(target, 2, adviceMember);
@@ -151,7 +151,7 @@ public class ConcretizationTestCase extends WeaveTestCase {
sp.resolve(
new SimpleScope(
world,
- SimpleScope.makeFormalBindings(TypeX.forNames(formalTypes),
+ SimpleScope.makeFormalBindings(UnresolvedType.forNames(formalTypes),
formalNames)
));
return rp;
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java
index 724e331bc..ed0f0a5af 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/ParserTestCase.java
@@ -17,7 +17,7 @@ import junit.framework.TestCase;
import org.aspectj.weaver.BcweaverTests;
import org.aspectj.weaver.Shadow;
-import org.aspectj.weaver.TypeX;
+import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.World;
import org.aspectj.weaver.bcel.BcelShadow;
import org.aspectj.weaver.bcel.BcelWorld;
@@ -295,7 +295,7 @@ public class ParserTestCase extends TestCase {
public void testParseAllowedSuperInTypeVariable() {
PatternParser parser = new PatternParser("T super Number+");
TypeVariablePattern tv = parser.parseTypeVariable();
- TypeVariablePattern expected = new TypeVariablePattern("T",new ExactTypePattern(TypeX.OBJECT,false,false),null,new PatternParser("Number+").parseTypePattern());
+ TypeVariablePattern expected = new TypeVariablePattern("T",new ExactTypePattern(UnresolvedType.OBJECT,false,false),null,new PatternParser("Number+").parseTypePattern());
assertEquals("Expected type variable T super Number+",expected,tv);
}
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/PointcutTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/PointcutTestCase.java
index 857c82171..6c9d19d6b 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/PointcutTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/PointcutTestCase.java
@@ -19,7 +19,7 @@ import org.aspectj.lang.Signature;
import org.aspectj.runtime.reflect.Factory;
import org.aspectj.util.FuzzyBoolean;
import org.aspectj.weaver.IntMap;
-import org.aspectj.weaver.ResolvedTypeX;
+import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.Shadow;
import org.aspectj.weaver.ast.Test;
@@ -56,7 +56,7 @@ public class PointcutTestCase extends TestCase {
protected void resolveBindingsFromRTTI() {}
- protected Pointcut concretize1(ResolvedTypeX inAspect, IntMap bindings) {
+ protected Pointcut concretize1(ResolvedType inAspect, IntMap bindings) {
return null;
}
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/TestScope.java b/weaver/testsrc/org/aspectj/weaver/patterns/TestScope.java
index 082c4f2e7..d0d6b9b37 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/TestScope.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/TestScope.java
@@ -25,6 +25,6 @@ public class TestScope extends SimpleScope {
}
public TestScope(String[] formalTypes, String[] formalNames, World world) {
- super(world, SimpleScope.makeFormalBindings(TypeX.forNames(formalTypes), formalNames));
+ super(world, SimpleScope.makeFormalBindings(UnresolvedType.forNames(formalTypes), formalNames));
}
}
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternListTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternListTestCase.java
index 429e8634e..09ec21fe5 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternListTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternListTestCase.java
@@ -108,7 +108,7 @@ public class TypePatternListTestCase extends TestCase {
// to test the wildcarding, and we don't do DYNAMIC matching on wildcarded things.
TypePatternList p = makeArgumentsPattern(pattern);
- ResolvedTypeX[] types = new ResolvedTypeX[names.length];
+ ResolvedType[] types = new ResolvedType[names.length];
for (int i = 0; i < names.length; i++) {
types[i] = world.resolve(names[i]);
}
@@ -133,7 +133,7 @@ public class TypePatternListTestCase extends TestCase {
for (int j = 0; j < len; j++) {
- ResolvedTypeX[] types = new ResolvedTypeX[j];
+ ResolvedType[] types = new ResolvedType[j];
for (int i = 0; i < j; i++) {
types[i] = world.resolve("int");
}
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternTestCase.java
index 354d6edba..6925b084e 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/TypePatternTestCase.java
@@ -219,7 +219,7 @@ public class TypePatternTestCase extends TestCase {
private void checkIllegalInstanceofMatch(String pattern, String name) {
try {
TypePattern p = makeTypePattern(pattern);
- ResolvedTypeX type = world.resolve(name);
+ ResolvedType type = world.resolve(name);
/*FuzzyBoolean result = */p.matchesInstanceof(type);
} catch (AbortException e) {
return;
@@ -229,7 +229,7 @@ public class TypePatternTestCase extends TestCase {
private void checkInstanceofMatch(String pattern, String name, FuzzyBoolean shouldMatch) {
TypePattern p = makeTypePattern(pattern);
- ResolvedTypeX type = world.resolve(name);
+ ResolvedType type = world.resolve(name);
p = p.resolveBindings(makeTestScope(), null, false, false);
@@ -260,7 +260,7 @@ public class TypePatternTestCase extends TestCase {
String name,
boolean shouldMatch)
{
- ResolvedTypeX type = world.resolve(name);
+ ResolvedType type = world.resolve(name);
//System.out.println("type: " + type);
boolean result = p.matchesStatically(type);
String msg = "matches " + p + " to " + type + " expected ";
diff --git a/weaver/testsrc/org/aspectj/weaver/patterns/WithinTestCase.java b/weaver/testsrc/org/aspectj/weaver/patterns/WithinTestCase.java
index 208431598..bfbe18bc0 100644
--- a/weaver/testsrc/org/aspectj/weaver/patterns/WithinTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/patterns/WithinTestCase.java
@@ -35,7 +35,7 @@ public class WithinTestCase extends TestCase {
Shadow getOutFromArrayList = new TestShadow(
Shadow.FieldGet,
Member.fieldFromString("java.io.PrintStream java.lang.System.out"),
- TypeX.forName("java.util.ArrayList"),
+ UnresolvedType.forName("java.util.ArrayList"),
world);
checkMatch(makePointcut("within(*)"), getOutFromArrayList, FuzzyBoolean.YES);
@@ -51,7 +51,7 @@ public class WithinTestCase extends TestCase {
Shadow getOutFromEntry = new TestShadow(
Shadow.FieldGet,
Member.fieldFromString("java.io.PrintStream java.lang.System.out"),
- TypeX.forName("java.util.Map$Entry"),
+ UnresolvedType.forName("java.util.Map$Entry"),
world);
checkMatch(makePointcut("within(*)"), getOutFromEntry, FuzzyBoolean.YES);