]> source.dussan.org Git - aspectj.git/commitdiff
teach a typex whether or not it represents a type variable
authoracolyer <acolyer>
Wed, 13 Jul 2005 10:13:10 +0000 (10:13 +0000)
committeracolyer <acolyer>
Wed, 13 Jul 2005 10:13:10 +0000 (10:13 +0000)
weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java
weaver/src/org/aspectj/weaver/TypeX.java
weaver/src/org/aspectj/weaver/UnresolvedTypeVariableReferenceType.java

index 37eed50da67f3167e02af3e26486b73c86624be5..91d6789fcb2d2ebd766583d62f3835054002f050 100644 (file)
@@ -41,4 +41,8 @@ public class TypeVariableReferenceType extends BoundedReferenceType {
                return typeVariable;
        }
        
+       public boolean isTypeVariable() {
+               return true;
+       }
+       
 }
index 7763d1e7a58463efdf2a54106f5b403c4d7c6a0f..ef5a947e1d42a7c79c791b1c3df3dadceca8344e 100644 (file)
@@ -483,6 +483,9 @@ public class TypeX implements AnnotatedElement {
                return typeKind==GENERIC;
        }
        
+       public boolean isTypeVariable() {
+               return false;
+       }
        
     /**
      * Returns a TypeX object representing the effective outermost enclosing type
index b33b100b8a2e78a71f3421cc7c6a2ba9edbf1bde..8c8d03948bd7c2ea6f1ce9a5c481ec523e2e7f60 100644 (file)
@@ -40,5 +40,17 @@ public class UnresolvedTypeVariableReferenceType extends TypeX {
                typeVariable.resolve(world);
                return new TypeVariableReferenceType(typeVariable,world);
        }
+       
+       public boolean isTypeVariable() {
+               return true;
+       }
+
+       public String toString() {
+               if (typeVariable == null) {
+                       return "<type variable not set!>";
+               } else {
+                       return "T" + typeVariable.getName() + ";";
+               }
+       }
 
 }