]> source.dussan.org Git - aspectj.git/commitdiff
205907 - world remembers registered handlers
authoraclement <aclement>
Fri, 14 Mar 2008 18:54:30 +0000 (18:54 +0000)
committeraclement <aclement>
Fri, 14 Mar 2008 18:54:30 +0000 (18:54 +0000)
weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java

index e0a205a52c72f8a7fdf61653fc9fcdb75889e2e3..eccfd962c108bc993e04909501c2606ccba60381 100644 (file)
@@ -17,6 +17,8 @@ import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.lang.reflect.Type;
+import java.util.Iterator;
+import java.util.Set;
 
 import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.reflect.AjType;
@@ -31,6 +33,7 @@ import org.aspectj.weaver.TypeVariable;
 import org.aspectj.weaver.TypeVariableReferenceType;
 import org.aspectj.weaver.UnresolvedType;
 import org.aspectj.weaver.World;
+import org.aspectj.weaver.tools.PointcutDesignatorHandler;
 import org.aspectj.weaver.tools.PointcutParameter;
 
 /**
@@ -251,6 +254,11 @@ public class Java15ReflectionBasedReferenceTypeDelegate extends
                        } else {
                                parser = new InternalUseOnlyPointcutParser(classLoader);
                        }
+                       Set additionalPointcutHandlers = world.getRegisteredPointcutHandlers();
+            for (Iterator handlerIterator = additionalPointcutHandlers.iterator(); handlerIterator.hasNext();) {
+                PointcutDesignatorHandler handler = (PointcutDesignatorHandler) handlerIterator.next();
+                parser.registerPointcutDesignatorHandler(handler);
+            }
                                                
                        // phase 1, create legitimate entries in pointcuts[] before we attempt to resolve *any* of the pointcuts
                        // resolution can sometimes cause us to recurse, and this two stage process allows us to cope with that