diff options
author | aclement <aclement> | 2005-01-18 14:26:36 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-01-18 14:26:36 +0000 |
commit | 00b76289a20e67377b15a544ccaad117bc123048 (patch) | |
tree | 956cc98b9700e2ef9fa4e18a90cca40d23a96aef /org.aspectj.ajdt.core | |
parent | fe310a4e10cf69486f54d5cf4edd4893b0a0835c (diff) | |
download | aspectj-00b76289a20e67377b15a544ccaad117bc123048.tar.gz aspectj-00b76289a20e67377b15a544ccaad117bc123048.zip |
Fix to allow pertypewithin aspectOf() to cope with 1.5 generic form of java.lang.Class
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java index 89587eead..9c49259b4 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java @@ -285,7 +285,14 @@ public class EclipseFactory { } else { String n = typeX.getName(); char[][] name = CharOperation.splitOn('.', n.toCharArray()); - return lookupEnvironment.getType(name); + ReferenceBinding rb = lookupEnvironment.getType(name); + // XXX We do this because the pertypewithin aspectOf(Class) generated method needs it. Without this + // we don't get a 'rawtype' as the argument type for a messagesend to aspectOf() and this leads to + // a compile error if some client class calls aspectOf(A.class) or similar as it says Class<A> isn't + // compatible with Class<T> + if (n.equals("java.lang.Class")) + rb = lookupEnvironment.createRawType(rb,rb.enclosingType()); + return rb; } } |