From: aclement Date: Fri, 25 Jan 2008 19:01:37 +0000 (+0000) Subject: paramannos: implementation! X-Git-Tag: V1_6_0M2~81 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f082e49ea87ebb70a18f75b1b0da34286f24051b;p=aspectj.git paramannos: implementation! --- diff --git a/weaver/src/org/aspectj/weaver/patterns/SignaturePattern.java b/weaver/src/org/aspectj/weaver/patterns/SignaturePattern.java index b31287e77..7318344c8 100644 --- a/weaver/src/org/aspectj/weaver/patterns/SignaturePattern.java +++ b/weaver/src/org/aspectj/weaver/patterns/SignaturePattern.java @@ -382,7 +382,9 @@ public class SignaturePattern extends PatternNode { } if (!parameterTypes.canMatchSignatureWithNParameters(aMethod.getParameterTypes().length)) return FuzzyBoolean.NO; ResolvedType[] resolvedParameters = world.resolve(aMethod.getParameterTypes()); - if (!parameterTypes.matches(resolvedParameters, TypePattern.STATIC).alwaysTrue()) { + ResolvedType[][] parameterAnnotationTypes = aMethod.getParameterAnnotationTypes(); + if (parameterAnnotationTypes==null || parameterAnnotationTypes.length==0) parameterAnnotationTypes=null; + if (!parameterTypes.matches(resolvedParameters, TypePattern.STATIC,parameterAnnotationTypes).alwaysTrue()) { // It could still be a match based on the generic sig parameter types of a parameterized type if (!parameterTypes.matches(world.resolve(aMethod.getGenericParameterTypes()),TypePattern.STATIC).alwaysTrue()) { return FuzzyBoolean.MAYBE; @@ -398,6 +400,8 @@ public class SignaturePattern extends PatternNode { return FuzzyBoolean.YES; } + + /** * match on declaring type, parameter types, throws types */ @@ -406,7 +410,12 @@ public class SignaturePattern extends PatternNode { if (!parameterTypes.canMatchSignatureWithNParameters(aConstructor.getParameterTypes().length)) return FuzzyBoolean.NO; ResolvedType[] resolvedParameters = world.resolve(aConstructor.getParameterTypes()); - if (!parameterTypes.matches(resolvedParameters, TypePattern.STATIC).alwaysTrue()) { + + ResolvedType[][] parameterAnnotationTypes = aConstructor.getParameterAnnotationTypes(); + + if (parameterAnnotationTypes==null || parameterAnnotationTypes.length==0) parameterAnnotationTypes=null; + + if (!parameterTypes.matches(resolvedParameters, TypePattern.STATIC,parameterAnnotationTypes).alwaysTrue()) { // It could still be a match based on the generic sig parameter types of a parameterized type if (!parameterTypes.matches(world.resolve(aConstructor.getGenericParameterTypes()),TypePattern.STATIC).alwaysTrue()) { return FuzzyBoolean.MAYBE;