diff options
author | aclement <aclement> | 2005-02-01 09:19:53 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-02-01 09:19:53 +0000 |
commit | 5622679b2f8e757b3cccd7f92841a0ecd481e50b (patch) | |
tree | 815a0cc22b74ccdc7abdbb6c7983a986e8685e7b | |
parent | 1ca90c4bc3d8731224dbdbe24a86d78a900ddcdf (diff) | |
download | aspectj-5622679b2f8e757b3cccd7f92841a0ecd481e50b.tar.gz aspectj-5622679b2f8e757b3cccd7f92841a0ecd481e50b.zip |
Use the correct 'subject' at the join point for matching
-rw-r--r-- | weaver/src/org/aspectj/weaver/patterns/AnnotationPointcut.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/AnnotationPointcut.java b/weaver/src/org/aspectj/weaver/patterns/AnnotationPointcut.java index 2de0e2228..8ea4fac0c 100644 --- a/weaver/src/org/aspectj/weaver/patterns/AnnotationPointcut.java +++ b/weaver/src/org/aspectj/weaver/patterns/AnnotationPointcut.java @@ -105,9 +105,9 @@ public class AnnotationPointcut extends NameBindingPointcut { Shadow.Kind kind = shadow.getKind(); if (kind == Shadow.StaticInitialization) { - toMatchAgainst = rMember.getType(); + toMatchAgainst = rMember.getDeclaringType().resolve(shadow.getIWorld()); } else if ( (kind == Shadow.ExceptionHandler)) { - toMatchAgainst = TypeX.forName(rMember.getSignature()).resolve(shadow.getIWorld()); + toMatchAgainst = rMember.getParameterTypes()[0].resolve(shadow.getIWorld()); } else { toMatchAgainst = rMember; } @@ -149,7 +149,17 @@ public class AnnotationPointcut extends NameBindingPointcut { protected Test findResidueInternal(Shadow shadow, ExposedState state) { if (shadow.getKind()!=Shadow.MethodCall && - shadow.getKind()!=Shadow.MethodExecution) { + shadow.getKind()!=Shadow.ConstructorCall && + shadow.getKind()!=Shadow.ConstructorExecution && + shadow.getKind()!=Shadow.MethodExecution && + shadow.getKind()!=Shadow.FieldSet && + shadow.getKind()!=Shadow.FieldGet && + shadow.getKind()!=Shadow.StaticInitialization && + shadow.getKind()!=Shadow.PreInitialization && + shadow.getKind()!=Shadow.AdviceExecution && + shadow.getKind()!=Shadow.Initialization && + shadow.getKind()!=Shadow.ExceptionHandler + ) { IMessage lim = MessageUtil.error("Binding not supported in @pcds (1.5.0 M2 limitation) for "+shadow.getKind()+" join points, see: " + getSourceLocation()); shadow.getIWorld().getMessageHandler().handleMessage(lim); |