From: acolyer Date: Wed, 13 Jul 2005 10:13:10 +0000 (+0000) Subject: teach a typex whether or not it represents a type variable X-Git-Tag: PRE_ANDY~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d3e0e124ef2c57a96caf1b04338cb5dff692acab;p=aspectj.git teach a typex whether or not it represents a type variable --- 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 ""; + } else { + return "T" + typeVariable.getName() + ";"; + } + } }