aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2006-02-01 15:20:44 +0000
committeraclement <aclement>2006-02-01 15:20:44 +0000
commit795cd9eadc225d0c1c6d0297853bcd5ca8937be4 (patch)
tree12019ab62f23091e3635e2b3eb7138c5b65586d6
parent1d41626c3d8489acf9a630d9236a9ecdf912363d (diff)
downloadaspectj-795cd9eadc225d0c1c6d0297853bcd5ca8937be4.tar.gz
aspectj-795cd9eadc225d0c1c6d0297853bcd5ca8937be4.zip
fix for 125810 (from helen)
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java21
1 files changed, 17 insertions, 4 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
index 9174ef4ca..e0d3d79ba 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
@@ -420,8 +420,8 @@ public class AjLookupEnvironment extends LookupEnvironment implements AnonymousC
}
}
}
-
- if (hasPointcuts || dec instanceof AspectDeclaration) {
+
+ if (hasPointcuts || dec instanceof AspectDeclaration || isAnnotationStyleAspectDeclaration(dec)) {
ReferenceType name = (ReferenceType)factory.fromEclipse(sourceType);
EclipseSourceType eclipseSourceType = (EclipseSourceType)name.getDelegate();
eclipseSourceType.checkPointcutDeclarations();
@@ -433,9 +433,22 @@ public class AjLookupEnvironment extends LookupEnvironment implements AnonymousC
}
}
-
+ /**
+ * Return true if the declaration has @Aspect annotation
+ */
+ private boolean isAnnotationStyleAspectDeclaration(TypeDeclaration dec) {
+ Annotation[] annotations = dec.annotations;
+ boolean isAtAspect = false;
+ if (annotations != null) {
+ for (int i = 0; i < annotations.length && !isAtAspect; i++) {
+ if (annotations[i].resolvedType.debugName().equals("org.aspectj.lang.annotation.Aspect")) {
+ isAtAspect = true;
+ }
+ }
+ }
+ return isAtAspect;
+ }
-
private void buildInterTypeAndPerClause(ClassScope s) {
TypeDeclaration dec = s.referenceContext;
if (dec instanceof AspectDeclaration) {