diff options
author | acolyer <acolyer> | 2005-04-20 19:24:30 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-04-20 19:24:30 +0000 |
commit | 7a639d019a9b04b3eb7af97a7a2975cbbf72e0cf (patch) | |
tree | 8bd9464cb6c1df486ab5e84d301cf82bc11fbdcb /weaver/testsrc/org | |
parent | 1e6fae862407f7c0b49321a6c452774f91f3cd04 (diff) | |
download | aspectj-7a639d019a9b04b3eb7af97a7a2975cbbf72e0cf.tar.gz aspectj-7a639d019a9b04b3eb7af97a7a2975cbbf72e0cf.zip |
this set of commits teaches the TypeX world about parameterized types. it handles passing of parameterized types into the weaver from Eclipse, and back out again. Fixes the ITD and parameterized types issue that shows up in the examples. Much more work to be done in this area of course before M3.
Diffstat (limited to 'weaver/testsrc/org')
-rw-r--r-- | weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java b/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java index 3219b2f15..1ba812845 100644 --- a/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java +++ b/weaver/testsrc/org/aspectj/weaver/TypeXTestCase.java @@ -61,6 +61,21 @@ public class TypeXTestCase extends TestCase { assertEquals(t.getOutermostType(), TypeX.forName("java.util.Map")); assertEquals(TypeX.forName("java.util.Map").getOutermostType(), TypeX.forName("java.util.Map")); } + + public void testNameAndSigWithParameters() { + TypeX t = TypeX.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;>;"); + 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>>"); + 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;>;>;"); + 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;>;>;"); + } private void isPrimitiveTest(TypeX[] types, boolean[] isPrimitives) { for (int i = 0, len = types.length; i < len; i++) { |