]> source.dussan.org Git - aspectj.git/commitdiff
from branch: dealing with the binding of formals
authoraclement <aclement>
Tue, 19 Apr 2005 12:17:51 +0000 (12:17 +0000)
committeraclement <aclement>
Tue, 19 Apr 2005 12:17:51 +0000 (12:17 +0000)
weaver/src/org/aspectj/weaver/patterns/Pointcut.java

index d6950a4c467a67ee6c6e7b4fee015e6568e8d87c..cc5e86762a6307037907042b3d34ef9586fd3e26 100644 (file)
@@ -86,7 +86,13 @@ public abstract class Pointcut extends PatternNode implements PointcutExpression
                        super(name, key);
                }
        }
-       
+
+    /**
+     * ATAJ the name of the formal for which we don't want any warning when unbound since
+     * we consider them as implicitly bound. f.e. JoinPoint for @AJ advices
+     */
+    public String[] m_ignoreUnboundBindingForNames = new String[0];
+
        public static final State SYMBOLIC = new State("symbolic", 0);
        public static final State RESOLVED = new State("resolved", 1);
        public static final State CONCRETE = new State("concrete", 2);
@@ -229,7 +235,10 @@ public abstract class Pointcut extends PatternNode implements PointcutExpression
         * Only used by test cases
         */
     public final Pointcut concretize(ResolvedTypeX inAspect, int arity) {
-        return concretize(inAspect, IntMap.idMap(arity));
+        Pointcut ret = concretize(inAspect, IntMap.idMap(arity));
+        // copy the unbound ignore list
+        ret.m_ignoreUnboundBindingForNames = m_ignoreUnboundBindingForNames;
+        return ret;
     }
        
        
@@ -255,6 +264,8 @@ public abstract class Pointcut extends PatternNode implements PointcutExpression
                Pointcut ret = this.concretize1(inAspect, bindings);
         if (shouldCopyLocationForConcretize()) ret.copyLocationFrom(this);
                ret.state = CONCRETE;
+        // copy the unbound ignore list
+        ret.m_ignoreUnboundBindingForNames = m_ignoreUnboundBindingForNames;
                return ret;
        }