diff options
author | aclement <aclement> | 2011-05-31 22:09:48 +0000 |
---|---|---|
committer | aclement <aclement> | 2011-05-31 22:09:48 +0000 |
commit | a98d17d36ad7667c9f5c65dc65c62a572b040e17 (patch) | |
tree | 97a385843aa739416a3d1eeee09b4aef715371f7 | |
parent | 4585adab31f535c248500187de0b8261d2df542d (diff) | |
download | aspectj-a98d17d36ad7667c9f5c65dc65c62a572b040e17.tar.gz aspectj-a98d17d36ad7667c9f5c65dc65c62a572b040e17.zip |
pass formal name through
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/patterns/AnnotationPointcut.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/AnnotationPointcut.java b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/AnnotationPointcut.java index 261e3a481..44b346e60 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/patterns/AnnotationPointcut.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/patterns/AnnotationPointcut.java @@ -198,10 +198,12 @@ public class AnnotationPointcut extends NameBindingPointcut { protected Test findResidueInternal(Shadow shadow, ExposedState state) { if (annotationTypePattern instanceof BindingAnnotationFieldTypePattern) { if (shadow.getKind() != Shadow.MethodExecution) { - shadow.getIWorld().getMessageHandler().handleMessage( - MessageUtil.error( - "Annotation field binding is only supported at method-execution join points (compiler limitation)", - getSourceLocation())); + shadow.getIWorld() + .getMessageHandler() + .handleMessage( + MessageUtil + .error("Annotation field binding is only supported at method-execution join points (compiler limitation)", + getSourceLocation())); return Literal.TRUE; // exit quickly, error will prevent weaving } BindingAnnotationFieldTypePattern btp = (BindingAnnotationFieldTypePattern) annotationTypePattern; @@ -213,7 +215,7 @@ public class AnnotationPointcut extends NameBindingPointcut { if (var == null) { throw new BCException("Unexpected problem locating annotation at join point '" + shadow + "'"); } - state.set(btp.getFormalIndex(), var.getAccessorForValue(formalType)); + state.set(btp.getFormalIndex(), var.getAccessorForValue(formalType, btp.formalName)); } else if (annotationTypePattern instanceof BindingAnnotationTypePattern) { BindingAnnotationTypePattern btp = (BindingAnnotationTypePattern) annotationTypePattern; UnresolvedType annotationType = btp.getAnnotationType(); |