diff options
author | aclement <aclement> | 2006-05-18 11:46:57 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-05-18 11:46:57 +0000 |
commit | e1e919408d346b7ff985c4920de7ab2d777a9d3c (patch) | |
tree | 05a7c82f475573534c24a620d61f00d1f2b48fb4 /loadtime | |
parent | f1f3decfd2ff14d5d559e67f0209e567a6fbbc79 (diff) | |
download | aspectj-e1e919408d346b7ff985c4920de7ab2d777a9d3c.tar.gz aspectj-e1e919408d346b7ff985c4920de7ab2d777a9d3c.zip |
fix for 125480
Diffstat (limited to 'loadtime')
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java b/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java index bb6af4aac..73ac9f3da 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java @@ -170,7 +170,9 @@ public class ConcreteAspectCodeGen { n = n.substring(0,n.indexOf("$")); elligibleAbstractions.add(n); } else { - elligibleAbstractions.add(method.getName()); + // Only interested in abstract methods that take no parameters and are marked @Pointcut + if (hasPointcutAnnotation(method)) + elligibleAbstractions.add(method.getName()); } } else { reportError("Abstract method '" + method.getName() + "' cannot be concretized as a pointcut (illegal signature, must have no arguments, must return void): " + stringify()); @@ -209,6 +211,17 @@ public class ConcreteAspectCodeGen { sb.append("'/> in aop.xml"); return sb.toString(); } + + private boolean hasPointcutAnnotation(ResolvedMember member) { + AnnotationX[] as = member.getAnnotations(); + if (as==null || as.length==0) return false; + for (int i = 0; i < as.length; i++) { + if (as[i].getTypeSignature().equals("Lorg/aspectj/lang/annotation/Pointcut;")) { + return true; + } + } + return false; + } /** * Build the bytecode for the concrete aspect |