aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoraclement <aclement>2005-01-18 14:26:36 +0000
committeraclement <aclement>2005-01-18 14:26:36 +0000
commit00b76289a20e67377b15a544ccaad117bc123048 (patch)
tree956cc98b9700e2ef9fa4e18a90cca40d23a96aef /org.aspectj.ajdt.core
parentfe310a4e10cf69486f54d5cf4edd4893b0a0835c (diff)
downloadaspectj-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.java9
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;
}
}