]> source.dussan.org Git - aspectj.git/commitdiff
paramannos: implementation!
authoraclement <aclement>
Fri, 25 Jan 2008 19:01:37 +0000 (19:01 +0000)
committeraclement <aclement>
Fri, 25 Jan 2008 19:01:37 +0000 (19:01 +0000)
weaver/src/org/aspectj/weaver/patterns/SignaturePattern.java

index b31287e77ce24d5e4fe75b516fbee5c917af7c3c..7318344c8039627c204e0d6dedd1b662a536b539 100644 (file)
@@ -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;