aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-07-13 10:13:10 +0000
committeracolyer <acolyer>2005-07-13 10:13:10 +0000
commitd3e0e124ef2c57a96caf1b04338cb5dff692acab (patch)
treeb880e7d4dec5c5ae732db514a8cb4c1fecab98fa
parent2163a5f8f73aa91500d3000b6b582a1f3116f67b (diff)
downloadaspectj-d3e0e124ef2c57a96caf1b04338cb5dff692acab.tar.gz
aspectj-d3e0e124ef2c57a96caf1b04338cb5dff692acab.zip
teach a typex whether or not it represents a type variable
-rw-r--r--weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java4
-rw-r--r--weaver/src/org/aspectj/weaver/TypeX.java3
-rw-r--r--weaver/src/org/aspectj/weaver/UnresolvedTypeVariableReferenceType.java12
3 files changed, 19 insertions, 0 deletions
diff --git a/weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java b/weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java
index 37eed50da..91d6789fc 100644
--- a/weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java
+++ b/weaver/src/org/aspectj/weaver/TypeVariableReferenceType.java
@@ -41,4 +41,8 @@ public class TypeVariableReferenceType extends BoundedReferenceType {
return typeVariable;
}
+ public boolean isTypeVariable() {
+ return true;
+ }
+
}
diff --git a/weaver/src/org/aspectj/weaver/TypeX.java b/weaver/src/org/aspectj/weaver/TypeX.java
index 7763d1e7a..ef5a947e1 100644
--- a/weaver/src/org/aspectj/weaver/TypeX.java
+++ b/weaver/src/org/aspectj/weaver/TypeX.java
@@ -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
diff --git a/weaver/src/org/aspectj/weaver/UnresolvedTypeVariableReferenceType.java b/weaver/src/org/aspectj/weaver/UnresolvedTypeVariableReferenceType.java
index b33b100b8..8c8d03948 100644
--- a/weaver/src/org/aspectj/weaver/UnresolvedTypeVariableReferenceType.java
+++ b/weaver/src/org/aspectj/weaver/UnresolvedTypeVariableReferenceType.java
@@ -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() + ";";
+ }
+ }
}