[jboss-cvs] JBossAS SVN: r75986 - in projects/aop/branches/joinpoint_graph/aop/src: main/org/jboss/aop/joinpoint/graph and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jul 17 22:19:59 EDT 2008


Author: flavia.rainone at jboss.com
Date: 2008-07-17 22:19:58 -0400 (Thu, 17 Jul 2008)
New Revision: 75986

Added:
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/SearchKey.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/DomainJoinPointGraphTest.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/UnitaryJoinPointGraphTest.java
Removed:
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/ParsedSearchKey.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/SearchKey.java
Modified:
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/JoinPointManager.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/AllSearcher.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/CompositeSearchKey.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/ConjunctiveSearchKey.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/DisjunctiveSearchKey.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/DomainJoinPointGraph.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/EmptySearchKey.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/JoinPointGraph.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/JoinPointGraphFactory.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/JoinPointGraphImpl.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/MainJoinPointGraph.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/NegativeCompositeSearchKey.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/ParameterParser.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/PointcutDelegator.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/SearchKeyParser.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/StandardSearchKey.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/TypeFilter.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/TypedefParser.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/UnitaryJoinPointGraph.java
   projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/PointcutExpression.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/AbstractSearchKeyParserTest.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/AllTests.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/BehaviorSearchKeyParserTest.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/ClassSearchKeyParserTest.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/CompositeSearchKeyParserTest.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/ConjunctiveSearchKeyTest.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/DisjunctiveSearchKeyTest.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/FieldSearchKeyParserTest.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/FullScenarioBuilder.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/InstanceAdvisorMock.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/MainJoinPointGraphTest.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/ParamSearchKeyParserTest.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/PointcutDelegatorTest.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/StandardSearchKeyTest.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/TypeFilterTest.java
   projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/TypedefParserTest.java
Log:
[JBAOP-615] Completed the implementation of the domain mechanism.

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/JoinPointManager.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/JoinPointManager.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/JoinPointManager.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -43,8 +43,6 @@
 import org.jboss.aop.joinpoint.MethodJoinpoint;
 import org.jboss.aop.joinpoint.graph.JoinPointGraph;
 import org.jboss.aop.joinpoint.graph.JoinPointGraphFactory;
-import org.jboss.aop.joinpoint.graph.SearchKey;
-import org.jboss.aop.joinpoint.graph.SearchKeyParser;
 import org.jboss.aop.pointcut.Pointcut;
 
 /**
@@ -202,8 +200,7 @@
    
    protected Collection<JoinPointInfo> getMatch(Pointcut pointcut)
    {
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
-      return joinPointGraph.search(searchKey);
+      return joinPointGraph.search(pointcut);
    }
 
    @Override

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/AllSearcher.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/AllSearcher.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/AllSearcher.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -52,9 +52,9 @@
    public AllSearcher()
    {
       this.allBehaviorExecutions = new BehaviorSearcher("*",
-            ParsedSearchKey.EMPTY_ATTRIBUTES, ParsedSearchKey.EMPTY_EXCEPTIONS);
+            SearchKey.EMPTY_ATTRIBUTES, SearchKey.EMPTY_EXCEPTIONS);
       this.allBehaviorExecutions.setSearchType(BehaviorSearcher.SearchType.EXECUTION);
-      this.allFieldAccesses = new FieldSearcher("*", ParsedSearchKey.EMPTY_ATTRIBUTES, null);
+      this.allFieldAccesses = new FieldSearcher("*", SearchKey.EMPTY_ATTRIBUTES, null);
       this.allFieldAccesses.setSearchType(FieldSearcher.SearchType.ALL);
    }
 

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/CompositeSearchKey.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/CompositeSearchKey.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/CompositeSearchKey.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -30,8 +30,8 @@
  */
 abstract class CompositeSearchKey extends NegativeCompositeSearchKey
 {
-   protected ParsedSearchKey searchKey1;
-   protected ParsedSearchKey searchKey2;
+   protected SearchKey searchKey1;
+   protected SearchKey searchKey2;
    
    /**
     * Constructor.
@@ -39,7 +39,7 @@
     * @param searchKey1 one of the internal search keys
     * @param searchKey2 one of the internal search keys
     */
-   public CompositeSearchKey(ParsedSearchKey searchKey1, ParsedSearchKey searchKey2)
+   public CompositeSearchKey(SearchKey searchKey1, SearchKey searchKey2)
    {
       this.searchKey1 = searchKey1;
       this.searchKey2 = searchKey2;
@@ -64,7 +64,7 @@
    }
 
    @Override
-   public final ParsedSearchKey addConjunctiveTypeFilter(TypeFilter typeFilter)
+   public final SearchKey addConjunctiveTypeFilter(TypeFilter typeFilter)
    {
       searchKey1 = searchKey1.addConjunctiveTypeFilter(typeFilter);
       searchKey2 = searchKey2.addConjunctiveTypeFilter(typeFilter);
@@ -72,13 +72,13 @@
    }
    
    @Override
-   public final ParsedSearchKey addDisjunctiveTypeFilter(TypeFilter typeFilter)
+   public final SearchKey addDisjunctiveTypeFilter(TypeFilter typeFilter)
    {
-      ParsedSearchKey newSearchKey1 = searchKey1.addDisjunctiveTypeFilter(typeFilter);
-      ParsedSearchKey newSearchKey2 = searchKey2.addDisjunctiveTypeFilter(typeFilter);
+      SearchKey newSearchKey1 = searchKey1.addDisjunctiveTypeFilter(typeFilter);
+      SearchKey newSearchKey2 = searchKey2.addDisjunctiveTypeFilter(typeFilter);
       if (newSearchKey1 != searchKey1 && newSearchKey2 != searchKey2)
       {
-         ParsedSearchKey searchKey = new StandardSearchKey();
+         SearchKey searchKey = new StandardSearchKey();
          searchKey.addConjunctiveTypeFilter(typeFilter);
          return new DisjunctiveSearchKey(this, searchKey);
       }
@@ -91,7 +91,7 @@
    }
 
    @Override
-   public final ParsedSearchKey addConjunctiveCalleeRestriction(CalleeSearcher calleeRestriction)
+   public final SearchKey addConjunctiveCalleeRestriction(CalleeSearcher calleeRestriction)
    {
       searchKey1 = searchKey1.addConjunctiveCalleeRestriction(calleeRestriction);
       searchKey2 = searchKey2.addConjunctiveCalleeRestriction(calleeRestriction);
@@ -99,13 +99,13 @@
    }
    
    @Override
-   public final ParsedSearchKey addDisjunctiveCalleeRestriction(CalleeSearcher calleeRestriction)
+   public final SearchKey addDisjunctiveCalleeRestriction(CalleeSearcher calleeRestriction)
    {
-      ParsedSearchKey newSearchKey1 = searchKey1.addDisjunctiveCalleeRestriction(calleeRestriction);
-      ParsedSearchKey newSearchKey2 = searchKey2.addDisjunctiveCalleeRestriction(calleeRestriction);
+      SearchKey newSearchKey1 = searchKey1.addDisjunctiveCalleeRestriction(calleeRestriction);
+      SearchKey newSearchKey2 = searchKey2.addDisjunctiveCalleeRestriction(calleeRestriction);
       if (newSearchKey1 != searchKey1 && newSearchKey2 != searchKey2)
       {
-         ParsedSearchKey searchKey = new StandardSearchKey();
+         SearchKey searchKey = new StandardSearchKey();
          searchKey.addConjunctiveCalleeRestriction(calleeRestriction);
          return new DisjunctiveSearchKey(this, searchKey);
       }
@@ -118,12 +118,12 @@
    }
    
    @Override
-   public final ParsedSearchKey addConjunctiveSearchKey(ParsedSearchKey searchKey)
+   public final SearchKey addConjunctiveSearchKey(SearchKey searchKey)
    {
       if (searchKey instanceof StandardSearchKey && !searchKey.hasSearcher())
       {
          StandardSearchKey key = (StandardSearchKey) searchKey;
-         ParsedSearchKey result = this;
+         SearchKey result = this;
          if (key.calleeRestriction != null)
          {
             result = this.addConjunctiveCalleeRestriction(
@@ -135,7 +135,7 @@
          }
          if (key.negativeSearchKeys != null)
          {
-            for (ParsedSearchKey negativeKey: key.negativeSearchKeys)
+            for (SearchKey negativeKey: key.negativeSearchKeys)
             {
                this.addNegativeSearchKey(negativeKey);
             }
@@ -146,13 +146,13 @@
    }
    
    @Override
-   public final ParsedSearchKey addDisjunctiveSearchKey(ParsedSearchKey searchKey)
+   public final SearchKey addDisjunctiveSearchKey(SearchKey searchKey)
    {
       return new DisjunctiveSearchKey(this, searchKey);
    }
 
    @Override
-   public ParsedSearchKey finishParsing()
+   public SearchKey finishParsing()
    {
       this.searchKey1 = searchKey1.finishParsing();
       this.searchKey2 = searchKey2.finishParsing();

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/ConjunctiveSearchKey.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/ConjunctiveSearchKey.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/ConjunctiveSearchKey.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -42,7 +42,7 @@
     * @param searchKey1 one of the internal search keys
     * @param searchKey2 one of the internal search keys
     */
-   public ConjunctiveSearchKey(ParsedSearchKey searchKey1, ParsedSearchKey searchKey2)
+   public ConjunctiveSearchKey(SearchKey searchKey1, SearchKey searchKey2)
    {
       super(searchKey1, searchKey2);
    }
@@ -68,7 +68,7 @@
    }
    
    @Override
-   public ParsedSearchKey finishParsing()
+   public SearchKey finishParsing()
    {
       super.finishParsing();
       if (searchKey1 instanceof EmptySearchKey)

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/DisjunctiveSearchKey.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/DisjunctiveSearchKey.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/DisjunctiveSearchKey.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -41,7 +41,7 @@
     * @param searchKey1 one of the internal search keys
     * @param searchKey2 one of the internal search keys
     */
-   public DisjunctiveSearchKey(ParsedSearchKey searchKey1, ParsedSearchKey searchKey2)
+   public DisjunctiveSearchKey(SearchKey searchKey1, SearchKey searchKey2)
    {
       super(searchKey1, searchKey2);
    }
@@ -89,7 +89,7 @@
    }
    
    @Override
-   public ParsedSearchKey finishParsing()
+   public SearchKey finishParsing()
    {
       super.finishParsing();
       if (searchKey1 instanceof EmptySearchKey)
@@ -113,7 +113,7 @@
    private void delegateSearch(SearchKey searchKey,
          Tree<? extends ClassNode> classTree, Collection<JoinPointInfo> result)
    {
-      if (((ParsedSearchKey) searchKey).requiresExclusiveResult())
+      if (((SearchKey) searchKey).requiresExclusiveResult())
       {
          Collection<JoinPointInfo> tempResult = new HashSet<JoinPointInfo>();
          searchKey.search(classTree, tempResult);

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/DomainJoinPointGraph.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/DomainJoinPointGraph.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/DomainJoinPointGraph.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -22,6 +22,7 @@
 package org.jboss.aop.joinpoint.graph;
 
 import org.jboss.aop.Domain;
+import org.jboss.aop.pointcut.Pointcut;
 
 /**
  * A graph that represents a subgraph of the {@code MainJoinPointGraph main graph}.
@@ -31,13 +32,19 @@
  */
 class DomainJoinPointGraph extends MainJoinPointGraph
 {
-   private String domainTag;
+   private DomainFilter domainFilter;
+   private Domain domain;
    
    public DomainJoinPointGraph(Domain domain)
    {
-      this.domainTag = domain.getDomainName();
+      this.domain = domain;
+      this.domainFilter = new DomainFilter(domain.getDomainName());
       super.classTree = MainJoinPointGraph.getInstance().classTree;
    }
    
-   // TODO override search and use a domainTagFilter
+   @Override
+   protected SearchKey getSearchKey(Pointcut pointcut)
+   {
+      return SearchKeyParser.parse(pointcut, domain, domainFilter);
+   }
 }
\ No newline at end of file

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/EmptySearchKey.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/EmptySearchKey.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/EmptySearchKey.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -34,7 +34,7 @@
  * 
  * @author  <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
  */
-class EmptySearchKey extends ParsedSearchKey
+class EmptySearchKey extends SearchKey
 {
    private static final EmptySearchKey INSTANCE = new EmptySearchKey();
    
@@ -75,49 +75,49 @@
    }
 
    @Override
-   ParsedSearchKey addConjunctiveTypeFilter(TypeFilter typeFilter)
+   SearchKey addConjunctiveTypeFilter(TypeFilter typeFilter)
    {
       throw new IllegalStateException("This search key must be created only after parsing.");
    }
 
    @Override
-   ParsedSearchKey addDisjunctiveTypeFilter(TypeFilter typeFilter)
+   SearchKey addDisjunctiveTypeFilter(TypeFilter typeFilter)
    {
       throw new IllegalStateException("This search key must be created only after parsing.");
    }
    
    @Override
-   ParsedSearchKey addConjunctiveCalleeRestriction(CalleeSearcher calleeRestriction)
+   SearchKey addConjunctiveCalleeRestriction(CalleeSearcher calleeRestriction)
    {
       throw new IllegalStateException("This search key must be created only after parsing.");
    }
 
    @Override
-   ParsedSearchKey addDisjunctiveCalleeRestriction(CalleeSearcher calleeRestriction)
+   SearchKey addDisjunctiveCalleeRestriction(CalleeSearcher calleeRestriction)
    {
       throw new IllegalStateException("This search key must be created only after parsing.");
    }
 
    @Override
-   ParsedSearchKey addConjunctiveSearchKey(ParsedSearchKey searchKey)
+   SearchKey addConjunctiveSearchKey(SearchKey searchKey)
    {
       throw new IllegalStateException("This search key must be created only after parsing.");
    }
 
    @Override
-   ParsedSearchKey addDisjunctiveSearchKey(ParsedSearchKey searchKey)
+   SearchKey addDisjunctiveSearchKey(SearchKey searchKey)
    {
       throw new IllegalStateException("This search key must be created only after parsing.");
    }
 
    @Override
-   ParsedSearchKey addNegativeSearchKey(ParsedSearchKey searchKey)
+   SearchKey addNegativeSearchKey(SearchKey searchKey)
    {
       return this;
    }
 
    @Override
-   ParsedSearchKey finishParsing()
+   SearchKey finishParsing()
    {
       return this;
    }

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/JoinPointGraph.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/JoinPointGraph.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/JoinPointGraph.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -24,6 +24,7 @@
 import java.util.Collection;
 
 import org.jboss.aop.JoinPointInfo;
+import org.jboss.aop.pointcut.Pointcut;
 
 /**
  * Searchable data structure containing prepared joinpoints.
@@ -31,12 +32,12 @@
  * @author  <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
  */
 public interface JoinPointGraph
-{
+{   
    /**
     * Performs a search on this graph.
     * 
     * @param key contains all the information necessary to perform the search
     * @return a collection containing all joinpoints found during the search
     */
-   public Collection<JoinPointInfo> search(SearchKey key);
+   public Collection<JoinPointInfo> search(Pointcut pointcut);
 }
\ No newline at end of file

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/JoinPointGraphFactory.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/JoinPointGraphFactory.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/JoinPointGraphFactory.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -40,7 +40,7 @@
     * Returns the registry where joinpoints must be recorded in order to be inserted
     * to the appropriate joinpoint graphs.
     * 
-    * @return
+    * @return the joinpoint for joinpoint registration
     */
    public static JoinPointRegistry getRegistry()
    {
@@ -70,6 +70,7 @@
     */
    public static JoinPointGraph create(Domain domain)
    {
+      // TODO check this is correct
       if (domain instanceof InstanceDomain)
       {
          return new UnitaryJoinPointGraph((InstanceDomain) domain);

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/JoinPointGraphImpl.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/JoinPointGraphImpl.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/JoinPointGraphImpl.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -26,6 +26,7 @@
 
 import org.jboss.aop.JoinPointInfo;
 import org.jboss.aop.joinpoint.graph.tree.Tree;
+import org.jboss.aop.pointcut.Pointcut;
 
 /**
  * Contains code common to all {@code JoinPointGraph} implementors.
@@ -45,11 +46,9 @@
       classTree = new Tree<N>();
    }
    
-   public Collection<JoinPointInfo> search(SearchKey key)
+   public final Collection<JoinPointInfo> search(Pointcut pointcut)
    {
-      Collection<JoinPointInfo> result = new HashSet<JoinPointInfo>();
-      ((ParsedSearchKey) key).search(classTree, result);
-      return result;
+      return this.search(getSearchKey(pointcut)); 
    }
    
    /**
@@ -103,4 +102,26 @@
          insertClassNode(superClassNode, defaultKey);
       }
    }
+   
+   /**
+    * Performs a search on this graph.
+    * 
+    * @param key contains all the information necessary to perform the search
+    * @return a collection containing all joinpoints found during the search
+    */
+   protected Collection<JoinPointInfo> search(SearchKey key)
+   {
+      Collection<JoinPointInfo> result = new HashSet<JoinPointInfo>();
+      ((SearchKey) key).search(classTree, result);
+      return result;
+   }
+   
+   /**
+    * Returns the search key that searchs for all joinpoints matching {@code
+    * pointcut} in this graph.
+    * 
+    * @param pointcut the pointcut whose corresponding search key is to be returned
+    * @return the search key corresponding to {@code pointcut}
+    */
+   protected abstract SearchKey getSearchKey(Pointcut pointcut);
 }
\ No newline at end of file

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/MainJoinPointGraph.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/MainJoinPointGraph.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/MainJoinPointGraph.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -25,6 +25,7 @@
 import java.lang.reflect.Method;
 
 import org.jboss.aop.Advisor;
+import org.jboss.aop.AspectManager;
 import org.jboss.aop.ConByConInfo;
 import org.jboss.aop.ConByMethodInfo;
 import org.jboss.aop.ConstructionInfo;
@@ -34,6 +35,7 @@
 import org.jboss.aop.MethodByMethodInfo;
 import org.jboss.aop.MethodInfo;
 import org.jboss.aop.joinpoint.JoinPointRegistry;
+import org.jboss.aop.pointcut.Pointcut;
 
 /**
  * The main joinpoint graph.
@@ -136,6 +138,12 @@
       return superClassNode;
    }
    
+   @Override
+   protected SearchKey getSearchKey(Pointcut pointcut)
+   {
+      return SearchKeyParser.parse(pointcut, AspectManager.instance());
+   }
+   
    private BehaviorNode getBehavior(Advisor advisor, Class clazz,
          Constructor constructor)
    {

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/NegativeCompositeSearchKey.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/NegativeCompositeSearchKey.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/NegativeCompositeSearchKey.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -33,13 +33,13 @@
  * 
  * @author  <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
  */
-abstract class NegativeCompositeSearchKey extends ParsedSearchKey
+abstract class NegativeCompositeSearchKey extends SearchKey
 {
-   protected ArrayList<ParsedSearchKey> negativeSearchKeys;
+   protected ArrayList<SearchKey> negativeSearchKeys;
    
    
    @Override
-   public final ParsedSearchKey addNegativeSearchKey(ParsedSearchKey searchKey)
+   public final SearchKey addNegativeSearchKey(SearchKey searchKey)
    {
       if (searchKey instanceof StandardSearchKey && !searchKey.hasSearcher())
       {
@@ -60,7 +60,7 @@
       }
       if (this.negativeSearchKeys == null)
       {
-         this.negativeSearchKeys = new ArrayList<ParsedSearchKey>(1);
+         this.negativeSearchKeys = new ArrayList<SearchKey>(1);
       }
       this.negativeSearchKeys.add(searchKey);
       return this;

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/ParameterParser.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/ParameterParser.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/ParameterParser.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -24,6 +24,7 @@
 import java.util.Collection;
 import java.util.Iterator;
 
+import org.jboss.aop.AspectManager;
 import org.jboss.aop.pointcut.ast.ASTBehavior;
 import org.jboss.aop.pointcut.ast.ASTParameter;
 import org.jboss.aop.pointcut.ast.ClassExpression;
@@ -37,16 +38,18 @@
 {
    private static final ClassExpression WILDCARD = new ClassExpression("");
    private State currentState = State.START;
-   
+      
    /**
     * Parses the parameter list of {@code behavior}.
     * 
     * @param behavior contains the parameter list to be parsed
+    * @param manager  the domain that contains pointcut referenced elements
     * @param buffer   where the result of the parsing will be appended
     * @return a behavior filter if there is extra need for filtering the parameters
     *         of behaviors whose list match the parsed expression
     */
-   public BehaviorFilter parse(ASTBehavior behavior, StringBuffer buffer)
+   public BehaviorFilter parse(ASTBehavior behavior, AspectManager manager,
+         StringBuffer buffer)
    {
       buffer.append(BehaviorNode.PARAMS);
       if (behavior.isAnyParameters())
@@ -69,7 +72,7 @@
       {
          ASTParameter parameter = iterator.next();
          // get the expression of a restriction to be filtered
-         ClassExpression exp = currentState.parse(this, parameter, buffer);
+         ClassExpression exp = currentState.parse(this, parameter, manager, buffer);
          if (exp == WILDCARD)
          {
             // if there are restrictions to be filtered between two wildcards
@@ -107,7 +110,7 @@
       {
          while(iterator.hasNext())
          {
-            currentState.parse(this, iterator.next(), buffer);
+            currentState.parse(this, iterator.next(), manager, buffer);
          }
          currentState.finishParsing(buffer);
          return new FullParameterFilter(behavior);
@@ -418,7 +421,7 @@
       };
       
       public ClassExpression parse(ParameterParser parser, ASTParameter parameter,
-            StringBuffer buffer)
+            AspectManager manager, StringBuffer buffer)
       {
          ParameterType parameterType = ParameterType.getInstance(parameter);
          ParameterType typeToParse;
@@ -426,7 +429,7 @@
          if (parameterType == ParameterType.TYPEDEF)
          {
             parameterToParse = TypedefParser.extractClassExpression(
-                  parameter.getType());
+                  parameter.getType(), manager);
             typeToParse = ParameterType.getInstance(parameterToParse);
          }
          else

Deleted: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/ParsedSearchKey.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/ParsedSearchKey.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/ParsedSearchKey.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -1,177 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.aop.joinpoint.graph;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.jboss.aop.pointcut.ast.ASTAttribute;
-import org.jboss.aop.pointcut.ast.ASTException;
-
-
-/**
- * SearchKey used during search key parsing.
- * 
- * @author  <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
- */
-abstract class ParsedSearchKey extends SearchKey
-{
-   /**
-    * The type of search to be performed by a search key.
-    */
-   enum SearchType {ALL, FIELD, FIELD_GET, FIELD_SET, BEHAVIOR, CONSTRUCTION,
-      EXECUTION, CALL, UNDEFINED}
-     
-   
-   static final Collection<ASTAttribute> EMPTY_ATTRIBUTES = new ArrayList<ASTAttribute>(0);
-   static final Collection<ASTException> EMPTY_EXCEPTIONS = new ArrayList<ASTException>(0);
-
-   /**
-    * Defines the class search expression.
-    * 
-    * @param classExpression the class search expression. May contain wildcards, and
-    *                        may also start with {@code '@'} to indicate a metadata
-    *                        search
-    * @param instanceOf      if {@code true}, indicates that this search key should
-    *                        search for all classes that match
-    *                        {@code classExpression}, and for their subclasses as
-    *                        well.
-    */
-   abstract void setClassExpression(String classExpression, boolean instanceOf);
-  
-   /**
-    * Deifines the main searcher associated with this search key.
-    * 
-    * @param classNodeSearcher the main searcher
-    */
-   abstract void setSearcher(Searcher<ClassNode> classNodeSearcher);
-   
-   /**
-    * Indicates whether this parsed search key has a main searcher defined. If it has
-    * not, then this search key is partially filled, and has only filters and
-    * auxiliary searchers defined.
-    * 
-    * @return {@code true} if this parsed search key has a main searcher defined
-    */
-   abstract boolean hasSearcher();
-   
-   /**
-    * Returns the type of joinpoints searchked by this key. Can be invoked only
-    * after {@link #finishParsing()}.
-    * 
-    * @return the type of joinpoints searched by this key
-    */
-   abstract SearchType getSearchType();
-   
-   /**
-    * Adds the conjunctive {@code typeFilter} to this key.
-    * 
-    * @param typeFilter a filter to be applied as an additional rule to all
-    *                   joinpoints found this key
-    * @return a search key that represents the conjunction of this key with {@code
-    *         typeFilter}
-    */
-   abstract ParsedSearchKey addConjunctiveTypeFilter(TypeFilter typeFilter);
-   
-   /**
-    * Adds the disjunctive {@code typeFilter} to this key.
-    * 
-    * @param typeFilter a filter whose accepted types must be part of the result,
-    *                   in addition to the joinpoints found by this key
-    * @return a search key that represents the disjunction of this key with {@code
-    *         typeFilter}
-    */
-   abstract ParsedSearchKey addDisjunctiveTypeFilter(TypeFilter typeFilter);
-   
-   /**
-    * Adds the conjunctive {@code calleeRestriction} to this key.
-    * 
-    * @param calleeRestriction a callee restriction to be applied as an additional
-    *                          rule to all joinpoints found by this key
-    * @return a search key that represents the conjunction of this key with {@code
-    *         caleeRestriction}
-    */
-   abstract ParsedSearchKey addConjunctiveCalleeRestriction(CalleeSearcher calleeRestriction);
-   
-   /**
-    * Adds the disjunctive {@code calleeRestriction} to this key.
-    * 
-    * @param calleeRestriction a callee restriction whose accepted call joinpoints
-    *                          must be part of the result, in addition to the
-    *                          joinpoints found by this key
-    * @return a search key that represents the disjunction of this key with {@code
-    *         calleeRestriction}
-    */
-   abstract ParsedSearchKey addDisjunctiveCalleeRestriction(CalleeSearcher calleeRestriction);
-   
-   /**
-    * Adds the conjunctive {@code searchKey} to this key.
-    * 
-    * @param searchKey a search key to be applied as an additional rule to all
-    *                   joinpoints found this key
-    * @return a search key that represents the conjunction of this key with {@code
-    *         searchKey}
-    */
-   abstract ParsedSearchKey addConjunctiveSearchKey(ParsedSearchKey searchKey);
-   
-   /**
-    * Adds the disjunctive {@code searchKey} to this key.
-    * 
-    * @param searchKey a search key whose found joinpoints must be part of the
-    *                  result, in addition to the joinpoints found by this key
-    * @return a search key that represents the disjunction of this key with {@code
-    *         searchKey}
-    */
-   abstract ParsedSearchKey addDisjunctiveSearchKey(ParsedSearchKey searchKey);
-   
-   /**
-    * Adds the negative {@code searchKey} to this key.
-    * 
-    * @param searchKey a search key whose result must be excluded from the result
-    *                  of the search
-    * @return the search key that represents the result found by this search key
-    *         but not found by {@code searchKey}
-    */
-   abstract ParsedSearchKey addNegativeSearchKey(ParsedSearchKey searchKey);
-   
-   /**
-    * Called by the parser to signal that no more operations will be performed.
-    * Once this method is called, no other method of this class can be executed,
-    * except for the {@link Searcher#search(Object, Collection) search},
-    * {@link #requiresExclusiveResult()}, and {@link #getSearchType()} methods.
-    * This method must be executed before any search is performed with this key.
-    * 
-    * @return an optimized search key representing this search key
-    */
-   abstract ParsedSearchKey finishParsing();
-   
-   /**
-    * Indicates whether this search key requires an exclusive result collection to
-    * perform {@link Searcher#search(Object, Collection)}. If it does, a newly
-    * created, empty collection must be used to perform search.
-    * 
-    * @return {@code true} if this search key requires an exclusive result collection,
-    *         as consequence of the need to manipulate this collection before getting
-    *         to a final result.
-    */
-   abstract boolean requiresExclusiveResult();
-}
\ No newline at end of file

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/PointcutDelegator.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/PointcutDelegator.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/PointcutDelegator.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -81,51 +81,51 @@
    }
 
    @Override
-   ParsedSearchKey addConjunctiveTypeFilter(TypeFilter typeFilter)
+   SearchKey addConjunctiveTypeFilter(TypeFilter typeFilter)
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.addConjunctiveTypeFilter(typeFilter);
       return new ConjunctiveSearchKey(this, searchKey);
    }
 
    @Override
-   ParsedSearchKey addDisjunctiveTypeFilter(TypeFilter typeFilter)
+   SearchKey addDisjunctiveTypeFilter(TypeFilter typeFilter)
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.addConjunctiveTypeFilter(typeFilter);
       return new DisjunctiveSearchKey(this, searchKey);
    }
 
    @Override
-   ParsedSearchKey addConjunctiveCalleeRestriction(CalleeSearcher calleeRestriction)
+   SearchKey addConjunctiveCalleeRestriction(CalleeSearcher calleeRestriction)
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.addConjunctiveCalleeRestriction(calleeRestriction);
       return new ConjunctiveSearchKey(this, searchKey);
    }
 
    @Override
-   ParsedSearchKey addDisjunctiveCalleeRestriction(CalleeSearcher calleeRestriction)
+   SearchKey addDisjunctiveCalleeRestriction(CalleeSearcher calleeRestriction)
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.addConjunctiveCalleeRestriction(calleeRestriction);
       return new DisjunctiveSearchKey(this, searchKey);
    }
 
    @Override
-   ParsedSearchKey addConjunctiveSearchKey(ParsedSearchKey searchKey)
+   SearchKey addConjunctiveSearchKey(SearchKey searchKey)
    {
       return new ConjunctiveSearchKey(this, searchKey);
    }
 
    @Override
-   ParsedSearchKey addDisjunctiveSearchKey(ParsedSearchKey searchKey)
+   SearchKey addDisjunctiveSearchKey(SearchKey searchKey)
    {
       return new DisjunctiveSearchKey(this, searchKey);
    }
 
    @Override
-   ParsedSearchKey finishParsing()
+   SearchKey finishParsing()
    {
       return this;
    }

Deleted: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/SearchKey.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/SearchKey.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/SearchKey.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.aop.joinpoint.graph;
-
-import org.jboss.aop.joinpoint.graph.tree.Tree;
-
-/**
- * The {@code JoinPointGraph} search key.
- * 
- * @author  <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
- */
-public abstract class SearchKey implements Searcher<Tree<? extends ClassNode>>
-{
-   // make sure it does not get extended
-   SearchKey(){}
-}
\ No newline at end of file

Copied: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/SearchKey.java (from rev 75983, projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/ParsedSearchKey.java)
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/SearchKey.java	                        (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/SearchKey.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -0,0 +1,178 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.aop.joinpoint.graph;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.jboss.aop.joinpoint.graph.tree.Tree;
+import org.jboss.aop.pointcut.ast.ASTAttribute;
+import org.jboss.aop.pointcut.ast.ASTException;
+
+
+/**
+ * The {@code JoinPointGraph} search key.
+ * 
+ * @author  <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ */
+abstract class SearchKey implements Searcher<Tree<? extends ClassNode>>
+{
+   /**
+    * The type of search to be performed by a search key.
+    */
+   enum SearchType {ALL, FIELD, FIELD_GET, FIELD_SET, BEHAVIOR, CONSTRUCTION,
+      EXECUTION, CALL, UNDEFINED}
+     
+   
+   static final Collection<ASTAttribute> EMPTY_ATTRIBUTES = new ArrayList<ASTAttribute>(0);
+   static final Collection<ASTException> EMPTY_EXCEPTIONS = new ArrayList<ASTException>(0);
+
+   /**
+    * Defines the class search expression.
+    * 
+    * @param classExpression the class search expression. May contain wildcards, and
+    *                        may also start with {@code '@'} to indicate a metadata
+    *                        search
+    * @param instanceOf      if {@code true}, indicates that this search key should
+    *                        search for all classes that match
+    *                        {@code classExpression}, and for their subclasses as
+    *                        well.
+    */
+   abstract void setClassExpression(String classExpression, boolean instanceOf);
+  
+   /**
+    * Deifines the main searcher associated with this search key.
+    * 
+    * @param classNodeSearcher the main searcher
+    */
+   abstract void setSearcher(Searcher<ClassNode> classNodeSearcher);
+   
+   /**
+    * Indicates whether this parsed search key has a main searcher defined. If it has
+    * not, then this search key is partially filled, and has only filters and
+    * auxiliary searchers defined.
+    * 
+    * @return {@code true} if this parsed search key has a main searcher defined
+    */
+   abstract boolean hasSearcher();
+   
+   /**
+    * Returns the type of joinpoints searchked by this key. Can be invoked only
+    * after {@link #finishParsing()}.
+    * 
+    * @return the type of joinpoints searched by this key
+    */
+   abstract SearchType getSearchType();
+   
+   /**
+    * Adds the conjunctive {@code typeFilter} to this key.
+    * 
+    * @param typeFilter a filter to be applied as an additional rule to all
+    *                   joinpoints found this key
+    * @return a search key that represents the conjunction of this key with {@code
+    *         typeFilter}
+    */
+   abstract SearchKey addConjunctiveTypeFilter(TypeFilter typeFilter);
+   
+   /**
+    * Adds the disjunctive {@code typeFilter} to this key.
+    * 
+    * @param typeFilter a filter whose accepted types must be part of the result,
+    *                   in addition to the joinpoints found by this key
+    * @return a search key that represents the disjunction of this key with {@code
+    *         typeFilter}
+    */
+   abstract SearchKey addDisjunctiveTypeFilter(TypeFilter typeFilter);
+   
+   /**
+    * Adds the conjunctive {@code calleeRestriction} to this key.
+    * 
+    * @param calleeRestriction a callee restriction to be applied as an additional
+    *                          rule to all joinpoints found by this key
+    * @return a search key that represents the conjunction of this key with {@code
+    *         caleeRestriction}
+    */
+   abstract SearchKey addConjunctiveCalleeRestriction(CalleeSearcher calleeRestriction);
+   
+   /**
+    * Adds the disjunctive {@code calleeRestriction} to this key.
+    * 
+    * @param calleeRestriction a callee restriction whose accepted call joinpoints
+    *                          must be part of the result, in addition to the
+    *                          joinpoints found by this key
+    * @return a search key that represents the disjunction of this key with {@code
+    *         calleeRestriction}
+    */
+   abstract SearchKey addDisjunctiveCalleeRestriction(CalleeSearcher calleeRestriction);
+   
+   /**
+    * Adds the conjunctive {@code searchKey} to this key.
+    * 
+    * @param searchKey a search key to be applied as an additional rule to all
+    *                   joinpoints found this key
+    * @return a search key that represents the conjunction of this key with {@code
+    *         searchKey}
+    */
+   abstract SearchKey addConjunctiveSearchKey(SearchKey searchKey);
+   
+   /**
+    * Adds the disjunctive {@code searchKey} to this key.
+    * 
+    * @param searchKey a search key whose found joinpoints must be part of the
+    *                  result, in addition to the joinpoints found by this key
+    * @return a search key that represents the disjunction of this key with {@code
+    *         searchKey}
+    */
+   abstract SearchKey addDisjunctiveSearchKey(SearchKey searchKey);
+   
+   /**
+    * Adds the negative {@code searchKey} to this key.
+    * 
+    * @param searchKey a search key whose result must be excluded from the result
+    *                  of the search
+    * @return the search key that represents the result found by this search key
+    *         but not found by {@code searchKey}
+    */
+   abstract SearchKey addNegativeSearchKey(SearchKey searchKey);
+   
+   /**
+    * Called by the parser to signal that no more operations will be performed.
+    * Once this method is called, no other method of this class can be executed,
+    * except for the {@link Searcher#search(Object, Collection) search},
+    * {@link #requiresExclusiveResult()}, and {@link #getSearchType()} methods.
+    * This method must be executed before any search is performed with this key.
+    * 
+    * @return an optimized search key representing this search key
+    */
+   abstract SearchKey finishParsing();
+   
+   /**
+    * Indicates whether this search key requires an exclusive result collection to
+    * perform {@link Searcher#search(Object, Collection)}. If it does, a newly
+    * created, empty collection must be used to perform search.
+    * 
+    * @return {@code true} if this search key requires an exclusive result collection,
+    *         as consequence of the need to manipulate this collection before getting
+    *         to a final result.
+    */
+   abstract boolean requiresExclusiveResult();
+}
\ No newline at end of file

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/SearchKeyParser.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/SearchKeyParser.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/SearchKeyParser.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -71,53 +71,82 @@
  * @author  <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
  * @see JoinPointGraph#search(SearchKey)
  */
-public class SearchKeyParser implements PointcutExpressionParserVisitor
+class SearchKeyParser implements PointcutExpressionParserVisitor
 {
    private static SearchKeyParser INSTANCE = new SearchKeyParser();
-   private ParameterParser parameterParser = new ParameterParser();   
+   private ParameterParser parameterParser = new ParameterParser();
+   private AspectManager manager;
    
    /**
     * Parses the pointcut into a search key.
     * 
     * @param pointcut the pointcut expression to be parsed
+    * @param manager  the domain that contains all elements referenced by {@code
+    *                 pointcut} (such as typedefs and pointcut references)
     * @return a search key that searchs for all joinpoints matched by
     *         {@code pointcut}.
     */
-   public static SearchKey parse(Pointcut pointcut)
+   public static SearchKey parse(Pointcut pointcut, AspectManager manager)
    {
       if (pointcut instanceof PointcutExpression)
       {
          return INSTANCE.visit(((PointcutExpression) pointcut).getParsedExpression(),
-               null);
+               manager).finishParsing();
       }
       return new PointcutDelegator(pointcut);
    }
    
+   /**
+    * Parses the pointcut into a search key.
+    * 
+    * @param pointcut     the pointcut expression to be parsed
+    * @param manager      the domain that contains all elements referenced by {@code
+    *                     pointcut} (such as typedefs and pointcut references)
+    * @param domainFilter a filter that filters out all class nodes not belonging
+    *                     to a certain domain
+    * @return a search key that searchs for all joinpoints matched by
+    *         {@code pointcut}.
+    */
+   public static SearchKey parse(Pointcut pointcut, AspectManager manager,
+         DomainFilter domainFilter)
+   {
+      if (pointcut instanceof PointcutExpression)
+      {
+         SearchKey searchKey = INSTANCE.visit(((PointcutExpression) pointcut).
+               getParsedExpression(), manager);
+         searchKey.addConjunctiveTypeFilter(domainFilter);
+         return searchKey.finishParsing();
+      }
+      return new PointcutDelegator(pointcut);
+   }
+   
    private SearchKeyParser() {}
    
    /* START AST NODE ***************************************************************/
    
    public SearchKey visit(ASTStart node, Object data)
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      this.manager = (AspectManager) data;
+      SearchKey searchKey = new StandardSearchKey();
       searchKey = this.visitSubNode(node, searchKey);
-      return searchKey.finishParsing();
+      this.manager = null;
+      return searchKey;
    }
 
    /* COMPOSITE AST NODES **********************************************************/
    
    public Object visit(ASTComposite node, Object data)
    {
-      ParsedSearchKey searchKey = (ParsedSearchKey) data;
-      ParsedSearchKey result = (ParsedSearchKey)
+      SearchKey searchKey = (SearchKey) data;
+      SearchKey result = (SearchKey)
          node.jjtGetChild(0).jjtAccept(this,  new StandardSearchKey());
       return searchKey.addConjunctiveSearchKey(result);
    }
 
    public Object visit(ASTNot node, Object data)
    {
-      ParsedSearchKey searchKey = (ParsedSearchKey) data;
-      ParsedSearchKey negativeSearchKey = new StandardSearchKey();
+      SearchKey searchKey = (SearchKey) data;
+      SearchKey negativeSearchKey = new StandardSearchKey();
       Object result = node.jjtGetChild(0).jjtAccept(this, negativeSearchKey);
       if (result!= null)
       {
@@ -129,7 +158,7 @@
          {
             return new NegativeCalleeSearcher((CalleeSearcher) result);
          }
-         return searchKey.addNegativeSearchKey((ParsedSearchKey) result);
+         return searchKey.addNegativeSearchKey((SearchKey) result);
       }
       else
       {
@@ -139,29 +168,29 @@
 
    public Object visit(ASTSub node, Object data)
    {
-      ParsedSearchKey searchKey = (ParsedSearchKey) data;
+      SearchKey searchKey = (SearchKey) data;
       for (int i = 0; i < node.jjtGetNumChildren(); i++)
       {
-         searchKey = (ParsedSearchKey) node.jjtGetChild(i).jjtAccept(this, searchKey);  
+         searchKey = (SearchKey) node.jjtGetChild(i).jjtAccept(this, searchKey);  
       }
       return searchKey;
    }
 
    public Object visit(ASTAnd node, Object data)
    {
-      return visitSubNode(node, (ParsedSearchKey) data);
+      return visitSubNode(node, (SearchKey) data);
    }
       
-   private ParsedSearchKey visitSubNode(SimpleNode node, ParsedSearchKey searchKey)
+   private SearchKey visitSubNode(SimpleNode node, SearchKey searchKey)
    {
-      return (ParsedSearchKey) node.jjtGetChild(0).jjtAccept(this, searchKey);
+      return (SearchKey) node.jjtGetChild(0).jjtAccept(this, searchKey);
    }
 
    public Object visit(ASTOr node, Object data)
    {
-      ParsedSearchKey searchKey = (ParsedSearchKey) data;
-      ParsedSearchKey newSearchKey = new StandardSearchKey();
-      ParsedSearchKey result = (ParsedSearchKey) node.jjtGetChild(0).jjtAccept(this, newSearchKey);
+      SearchKey searchKey = (SearchKey) data;
+      SearchKey newSearchKey = new StandardSearchKey();
+      SearchKey result = (SearchKey) node.jjtGetChild(0).jjtAccept(this, newSearchKey);
       return searchKey.addDisjunctiveSearchKey(result);
    }
 
@@ -171,10 +200,10 @@
    /**
     * @param data the search key
     */
-   public ParsedSearchKey visit(ASTAll node, Object data)
+   public SearchKey visit(ASTAll node, Object data)
    {
-      ParsedSearchKey key = (ParsedSearchKey) data;
-      ParsedSearchKey originalKey = key;
+      SearchKey key = (SearchKey) data;
+      SearchKey originalKey = key;
       if (key.hasSearcher())
       {
          key = new StandardSearchKey();
@@ -185,10 +214,10 @@
    }
 
 
-   public ParsedSearchKey visit(ASTGet node, Object data)
+   public SearchKey visit(ASTGet node, Object data)
    {
-      ParsedSearchKey key = (ParsedSearchKey) data;
-      ParsedSearchKey originalKey = key;
+      SearchKey key = (SearchKey) data;
+      SearchKey originalKey = key;
       if (key.hasSearcher())
       {
          key = new StandardSearchKey();
@@ -200,10 +229,10 @@
       return key == originalKey? key: originalKey.addConjunctiveSearchKey(key);
    }
 
-   public ParsedSearchKey visit(ASTSet node, Object data)
+   public SearchKey visit(ASTSet node, Object data)
    {
-      ParsedSearchKey key = (ParsedSearchKey) data;
-      ParsedSearchKey originalKey = key;
+      SearchKey key = (SearchKey) data;
+      SearchKey originalKey = key;
       if (key.hasSearcher())
       {
          key = new StandardSearchKey();
@@ -215,10 +244,10 @@
       return key == originalKey? key: originalKey.addConjunctiveSearchKey(key);
    }
 
-   public ParsedSearchKey visit(ASTFieldExecution node, Object data)
+   public SearchKey visit(ASTFieldExecution node, Object data)
    {
-      ParsedSearchKey key = (ParsedSearchKey) data;
-      ParsedSearchKey originalKey = key;
+      SearchKey key = (SearchKey) data;
+      SearchKey originalKey = key;
       if (key.hasSearcher())
       {
          key = new StandardSearchKey();
@@ -233,10 +262,10 @@
    /**
     * @param data the search key
     */
-   public ParsedSearchKey visit(ASTConstruction node, Object data)
+   public SearchKey visit(ASTConstruction node, Object data)
    {
-      ParsedSearchKey key = (ParsedSearchKey) data;
-      ParsedSearchKey originalKey = key;
+      SearchKey key = (SearchKey) data;
+      SearchKey originalKey = key;
       if (key.hasSearcher())
       {
          key = new StandardSearchKey();
@@ -251,10 +280,10 @@
    /**
     * @param data the search key
     */
-   public ParsedSearchKey visit(ASTExecution node, Object data)
+   public SearchKey visit(ASTExecution node, Object data)
    {
-      ParsedSearchKey key = (ParsedSearchKey) data;
-      ParsedSearchKey originalKey = key;
+      SearchKey key = (SearchKey) data;
+      SearchKey originalKey = key;
       if (key.hasSearcher())
       {
          key = new StandardSearchKey();
@@ -269,7 +298,7 @@
    public Object visit(ASTCall node, Object data)
    {
       CalleeSearcher callee = (CalleeSearcher) node.getBehavior().jjtAccept(this, null);
-      ParsedSearchKey key = (ParsedSearchKey) data;
+      SearchKey key = (SearchKey) data;
       return key.addConjunctiveCalleeRestriction(callee);
    }
    
@@ -278,8 +307,8 @@
    
    public Object visit(ASTWithin node, Object data)
    {
-      ParsedSearchKey key = (ParsedSearchKey) data;
-      ParsedSearchKey originalKey = key;
+      SearchKey key = (SearchKey) data;
+      SearchKey originalKey = key;
       if (key.hasSearcher())
       {
          key = new StandardSearchKey();
@@ -288,7 +317,7 @@
       this.setClassExpression(key, node.getClazz());
       // create behaviour searcher
       BehaviorSearcher searcher = new BehaviorSearcher("*",
-            ParsedSearchKey.EMPTY_ATTRIBUTES, ParsedSearchKey.EMPTY_EXCEPTIONS);
+            SearchKey.EMPTY_ATTRIBUTES, SearchKey.EMPTY_EXCEPTIONS);
       searcher.setSearchType(BehaviorSearcher.SearchType.CALL);
       key.setSearcher(searcher);
       return key == originalKey? key: originalKey.addConjunctiveSearchKey(key);
@@ -296,8 +325,8 @@
 
    public Object visit(ASTWithincode node, Object data)
    {
-      ParsedSearchKey key = (ParsedSearchKey) data;
-      ParsedSearchKey originalKey = key;
+      SearchKey key = (SearchKey) data;
+      SearchKey originalKey = key;
       if (key.hasSearcher())
       {
          originalKey = key;
@@ -311,16 +340,16 @@
       return key == originalKey? key: originalKey.addConjunctiveSearchKey(key);
    }
 
-   public ParsedSearchKey visit(ASTHas node, Object data)
+   public SearchKey visit(ASTHas node, Object data)
    {
       TypeFilter typeFilter = new HasBehaviorFilter((SimpleNode) node.jjtGetChild(0));
-      return ((ParsedSearchKey) data).addConjunctiveTypeFilter(typeFilter);
+      return ((SearchKey) data).addConjunctiveTypeFilter(typeFilter);
    }
 
-   public ParsedSearchKey visit(ASTHasField node, Object data)
+   public SearchKey visit(ASTHasField node, Object data)
    {
       TypeFilter typeFilter = new HasFieldFilter((ASTField) node.jjtGetChild(0));
-      return ((ParsedSearchKey) data).addConjunctiveTypeFilter(typeFilter);
+      return ((SearchKey) data).addConjunctiveTypeFilter(typeFilter);
    }
 
    
@@ -328,13 +357,13 @@
    
    public Object visit(ASTPointcut node, Object data)
    {
-      Pointcut pointcut = AspectManager.instance().getPointcut(node.getPointcutName());
-      return parse((PointcutExpression) pointcut);
+      Pointcut pointcut = manager.getPointcut(node.getPointcutName());
+      return parse((PointcutExpression) pointcut, manager);
    }
    
    public FieldSearcher visit(ASTField node, Object data)
    {
-      this.setClassExpression((ParsedSearchKey) data, node.getClazz());
+      this.setClassExpression((SearchKey) data, node.getClazz());
       StringBuffer expression = new StringBuffer();
       FieldFilter filter = null;
       ClassExpression filterTarget = appendType(node.getType(), expression);
@@ -350,7 +379,7 @@
    public Object visit(ASTConstructor node, Object data)
    {
       StringBuffer expression = new StringBuffer();
-      BehaviorFilter behaviorFilter = visit(node, expression, (ParsedSearchKey) data);
+      BehaviorFilter behaviorFilter = visit(node, expression, (SearchKey) data);
       if (data == null)
       {
          if (behaviorFilter == null)
@@ -373,7 +402,7 @@
    public Object visit(ASTMethod node, Object data)
    {
       StringBuffer expression = new StringBuffer();
-      BehaviorFilter behaviorFilter = visit(node, expression, ((ParsedSearchKey) data));
+      BehaviorFilter behaviorFilter = visit(node, expression, ((SearchKey) data));
       if (data == null)
       {
          if (behaviorFilter == null)
@@ -415,7 +444,7 @@
 
    /* HELPER METHODS ***************************************************************/
 
-   public BehaviorFilter visit(ASTConstructor node, StringBuffer expression, ParsedSearchKey searchKey)
+   public BehaviorFilter visit(ASTConstructor node, StringBuffer expression, SearchKey searchKey)
    {
       // behaviour filter
       BehaviorFilter behaviourFilter = null;
@@ -446,7 +475,7 @@
          expression.append(annotationExp.getOriginal());
       }
       
-      BehaviorFilter parameterFilter = parameterParser.parse(node, expression);
+      BehaviorFilter parameterFilter = parameterParser.parse(node, manager, expression);
       if (parameterFilter != null)
       {
          if (behaviourFilter == null)
@@ -461,7 +490,7 @@
       return behaviourFilter;
    }
    
-   private BehaviorFilter visit(ASTMethod node, StringBuffer expression, ParsedSearchKey searchKey)
+   private BehaviorFilter visit(ASTMethod node, StringBuffer expression, SearchKey searchKey)
    {
       // behaviour filter
       BehaviorFilter behaviourFilter = null;
@@ -520,7 +549,7 @@
       }
       
       // check parameters
-      BehaviorFilter parameterFilter = parameterParser.parse(node, expression);
+      BehaviorFilter parameterFilter = parameterParser.parse(node, manager, expression);
       if (parameterFilter != null)
       {
          if (behaviourFilter != null)
@@ -548,7 +577,7 @@
       }
       if (type.isTypedef())
       {
-         buffer.append(TypedefParser.parse(type));
+         buffer.append(TypedefParser.parse(type, manager));
       }
       else
       {
@@ -557,7 +586,7 @@
       return type;
    }
    
-   private void setClassExpression(ParsedSearchKey searchKey, ClassExpression classExpression)
+   private void setClassExpression(SearchKey searchKey, ClassExpression classExpression)
    {
       if (classExpression.isSimple() || classExpression.isAnnotation() ||
             classExpression.isPackage())
@@ -573,8 +602,8 @@
       // expression is typedef
       else
       {
-         Typedef typedef = TypedefParser.getTypedef(classExpression);
-         String expression = TypedefParser.parse(typedef);
+         Typedef typedef = TypedefParser.getTypedef(classExpression, manager);
+         String expression = TypedefParser.parse(typedef, manager);
          searchKey.setClassExpression(expression, false);
          searchKey.addConjunctiveTypeFilter(new TypedefFilter(typedef));
       }

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/StandardSearchKey.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/StandardSearchKey.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/StandardSearchKey.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -100,7 +100,7 @@
    }
    
    @Override
-   public ParsedSearchKey addConjunctiveTypeFilter(TypeFilter typeFilter)
+   public SearchKey addConjunctiveTypeFilter(TypeFilter typeFilter)
    {
       if (this.typeFilter == null)
       {
@@ -114,7 +114,7 @@
    }
    
    @Override
-   public ParsedSearchKey addDisjunctiveTypeFilter(TypeFilter typeFilter)
+   public SearchKey addDisjunctiveTypeFilter(TypeFilter typeFilter)
    {
       if (this.calleeRestriction == null && this.classExpression == null &&
             this.searcher == null)
@@ -133,7 +133,7 @@
    }
    
    @Override
-   public ParsedSearchKey addConjunctiveCalleeRestriction(
+   public SearchKey addConjunctiveCalleeRestriction(
          CalleeSearcher calleeRestriction)
    {
       if (this.calleeRestriction == null)
@@ -149,7 +149,7 @@
    }
    
    @Override
-   public ParsedSearchKey addDisjunctiveCalleeRestriction(
+   public SearchKey addDisjunctiveCalleeRestriction(
          CalleeSearcher calleeRestriction)
    {
       if (this.typeFilter == null && this.classExpression == null &&
@@ -171,14 +171,14 @@
    
    @Override
    // a searchKey without typefilters and callees?
-   public ParsedSearchKey addConjunctiveSearchKey(ParsedSearchKey searchKey)
+   public SearchKey addConjunctiveSearchKey(SearchKey searchKey)
    {
       return addConjunctiveSearchKey(searchKey, true);
    }
    
    @Override
-   public ParsedSearchKey addDisjunctiveSearchKey(
-         ParsedSearchKey searchKey)
+   public SearchKey addDisjunctiveSearchKey(
+         SearchKey searchKey)
    {
       if (searchKey instanceof StandardSearchKey)
       {
@@ -199,7 +199,7 @@
    }
    
    @Override
-   public ParsedSearchKey finishParsing()
+   public SearchKey finishParsing()
    {
       // already finished
       if (this.searcher != null && this.searcher instanceof SubtypeSearcher)
@@ -212,8 +212,8 @@
          {
             this.classExpression = "*";
             BehaviorSearcher behaviourSearcher =
-               new BehaviorSearcher("*", ParsedSearchKey.EMPTY_ATTRIBUTES,
-                     ParsedSearchKey.EMPTY_EXCEPTIONS);
+               new BehaviorSearcher("*", SearchKey.EMPTY_ATTRIBUTES,
+                     SearchKey.EMPTY_EXCEPTIONS);
             behaviourSearcher.setSearchType(BehaviorSearcher.SearchType.CALL);
             ((CallSearcher) behaviourSearcher.getInternalSearcher()).
                setCalleeRestriction(this.calleeRestriction);
@@ -249,19 +249,19 @@
          }
          this.classExpression = "*";
          BehaviorSearcher behaviourSearcher =
-            new BehaviorSearcher("*", ParsedSearchKey.EMPTY_ATTRIBUTES,
-                  ParsedSearchKey.EMPTY_EXCEPTIONS);
+            new BehaviorSearcher("*", SearchKey.EMPTY_ATTRIBUTES,
+                  SearchKey.EMPTY_EXCEPTIONS);
          behaviourSearcher.setSearchType(BehaviorSearcher.SearchType.ALL);
          this.searcher = behaviourSearcher;
          StandardSearchKey fieldSearchKey = new StandardSearchKey();
          fieldSearchKey.classExpression = "*";
          FieldSearcher fieldSearcher = new FieldSearcher("*",
-               ParsedSearchKey.EMPTY_ATTRIBUTES, null);
+               SearchKey.EMPTY_ATTRIBUTES, null);
          fieldSearcher.setSearchType(FieldSearcher.SearchType.ALL);
          fieldSearchKey.searcher = fieldSearcher;
          fieldSearchKey.typeFilter = this.typeFilter;
-         ParsedSearchKey searchKey = new DisjunctiveSearchKey(this, fieldSearchKey);
-         for (ParsedSearchKey negativeSearchKey: this.negativeSearchKeys)
+         SearchKey searchKey = new DisjunctiveSearchKey(this, fieldSearchKey);
+         for (SearchKey negativeSearchKey: this.negativeSearchKeys)
          {
             searchKey.addNegativeSearchKey(negativeSearchKey);
          }
@@ -286,7 +286,7 @@
       super.applyNegativeResult(classTree, result);
    }
    
-   private ParsedSearchKey addConjunctiveSearchKey(ParsedSearchKey searchKey,
+   private SearchKey addConjunctiveSearchKey(SearchKey searchKey,
          boolean recursionAllow)
    {
       if (this.classExpression == null && this.searcher == null &&

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/TypeFilter.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/TypeFilter.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/TypeFilter.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -222,4 +222,25 @@
    {
       return typedef.matches(type.getMetaDataContainer(), type.getClazz());
    }
+}
+
+class DomainFilter implements TypeFilter
+{
+   private String domainTag;
+   
+   public DomainFilter(String domainTag)
+   {
+      this.domainTag = domainTag;
+   }
+   
+   public boolean accept(ClassNode type)
+   {
+      if (!(type instanceof AdvisableClassNode))
+      {
+         return false;
+      }
+      AdvisedData advisedData = ((AdvisableClassNode) type).getAdvisedData();
+      return advisedData instanceof DomainData &&
+         ((DomainData) advisedData).hasTag(domainTag);
+   }
 }
\ No newline at end of file

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/TypedefParser.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/TypedefParser.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/TypedefParser.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -74,14 +74,16 @@
     * Returns the typedef referred by {@code classExpression}.
     * 
     * @param classExpression a typedef expression
+    * @param manager         the domain that contains the typedef referenced by
+    *                        {@code classExpression}
     * @return the typedef referred by {@code classExpression}.
     */
-   public static Typedef getTypedef(ClassExpression classExpression)
+   public static Typedef getTypedef(ClassExpression classExpression,
+         AspectManager manager)
    {
       String original = classExpression.getOriginal();
       String typedefName = original.substring("$typedef{".length(),
             original.lastIndexOf("}"));
-      AspectManager manager = AspectManager.instance(); 
       return manager.getTypedef(typedefName);
    }
    
@@ -90,28 +92,32 @@
     * for the types identified by {@code classExpression}.
     * 
     * @param classExpression a typedef expression
+    * @param manager         the domain that contains the typedef referenced by
+    *                        {@code classExpression}
     * @return a not-accurate expression that searches for the types identified by
     *         {@code classExpression}
     */
-   public static String parse(ClassExpression classExpression)
+   public static String parse(ClassExpression classExpression, AspectManager manager)
    {
-      Typedef typedef = getTypedef(classExpression);
-      return parse(typedef);
+      Typedef typedef = getTypedef(classExpression, manager);
+      return parse(typedef, manager);
    }
    
    /**
     * On a best effort basis, creates an expression that searches
     * for the types identified by {@code typedef}.
     * 
-    * @param typedef a typedef
+    * @param typedef         a typedef
+    * @param manager         the domain that contains elements referenced by
+    *                        {@code classExpression} (such as internal typedefs)
     * @return a not-accurate expression that searches for the types identified by
     *         {@code typedef}
     */
-   public static String parse(Typedef typedef)
+   public static String parse(Typedef typedef, AspectManager manager)
    {
       if (typedef != null && typedef instanceof TypedefExpression)
       {
-         return INSTANCE.parseSearchExpression(typedef);
+         return INSTANCE.parseSearchExpression(typedef, manager);
       }
       return "*";
    }
@@ -121,28 +127,33 @@
     * matches classes identified by {@code classExpression}.
     *  
     * @param classExpression a typedef expression
+    * @param manager         the domain that contains the typedef referenced by
+    *                        {@code classExpression}
     * @return the non-typedef class expression that best matches classes identified
     *         by {@code classExpression}.
     */
-   public static ClassExpression extractClassExpression(ClassExpression classExpression)
+   public static ClassExpression extractClassExpression(
+         ClassExpression classExpression, AspectManager manager)
    {
-      Typedef typedef = getTypedef(classExpression);
+      Typedef typedef = getTypedef(classExpression, manager);
       if (typedef != null && typedef instanceof TypedefExpression)
       {
-         ClassExpression exp = INSTANCE.extractBestClassExpression(typedef);
+         ClassExpression exp = INSTANCE.extractBestClassExpression(typedef, manager);
          return (exp == null)? WILDCARD: exp;
       }
       return WILDCARD;
    }
    
    @SuppressWarnings("all")
-   private synchronized String parseSearchExpression(Typedef typedef)
+   private synchronized String parseSearchExpression(Typedef typedef,
+         AspectManager manager)
    {
-      ClassExpression result = extractBestClassExpression(typedef);
+      ClassExpression result = extractBestClassExpression(typedef, manager);
        return (result == null)? "*": result.getOriginal();
    }
    
-   private synchronized ClassExpression extractBestClassExpression(Typedef typedef)
+   private synchronized ClassExpression extractBestClassExpression(
+         Typedef typedef, AspectManager manager)
    {
       this.subTypeDefs.clear();
       this.currentState = State.INITIAL;
@@ -158,7 +169,8 @@
          for (ClassExpression classExpression: subTypeDefs)
          {
             TypedefParser parser = new TypedefParser();
-            ClassExpression subResult = parser.extractBestClassExpression(getTypedef(classExpression));
+            ClassExpression subResult = parser.extractBestClassExpression(
+                  getTypedef(classExpression, manager), manager);
             if (subResult != null)
             {
                if (parser.currentState == State.DEFINITIVE)

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/UnitaryJoinPointGraph.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/UnitaryJoinPointGraph.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/joinpoint/graph/UnitaryJoinPointGraph.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -22,8 +22,10 @@
 package org.jboss.aop.joinpoint.graph;
 
 import org.jboss.aop.Advisor;
+import org.jboss.aop.Domain;
 import org.jboss.aop.InstanceDomain;
 import org.jboss.aop.joinpoint.graph.tree.Tree;
+import org.jboss.aop.pointcut.Pointcut;
 import org.jboss.aop.proxy.container.ProxyAdvisorDomain;
 
 /**
@@ -35,6 +37,8 @@
  */
 class UnitaryJoinPointGraph extends JoinPointGraphImpl<ClassNode>
 {
+   private Domain domain;
+   
    /**
     * Creates a graph to index the joinpoints managed by {@code domain}.
     * 
@@ -42,8 +46,7 @@
     */
    public UnitaryJoinPointGraph(InstanceDomain domain)
    {
-      this(domain.getAdvisor());
-      
+      this(domain, domain.getAdvisor());
    }
    
    /**
@@ -53,11 +56,12 @@
     */
    public UnitaryJoinPointGraph(ProxyAdvisorDomain domain)
    {
-      this(domain.getAdvisor());
+      this(domain, domain.getAdvisor());
    }
    
-   private UnitaryJoinPointGraph(Advisor advisor)
+   private UnitaryJoinPointGraph(Domain domain, Advisor advisor)
    {
+      this.domain = domain;
       Class<?> clazz = advisor.getClazz();
       String clazzId = ClassNode.getIdentifierKey(clazz);
       Tree<StandardClassNode> mainGraph = MainJoinPointGraph.getInstance().classTree;
@@ -71,4 +75,10 @@
    {
       return new UnitaryDomainSuperClassNode(superClazz, classNode);
    }
+   
+   @Override
+   protected SearchKey getSearchKey(Pointcut pointcut)
+   {
+      return SearchKeyParser.parse(pointcut, domain);
+   }
 }
\ No newline at end of file

Modified: projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/PointcutExpression.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/PointcutExpression.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/main/org/jboss/aop/pointcut/PointcutExpression.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -36,8 +36,6 @@
 
 import org.jboss.aop.Advisor;
 import org.jboss.aop.AspectManager;
-import org.jboss.aop.joinpoint.graph.SearchKey;
-import org.jboss.aop.joinpoint.graph.SearchKeyParser;
 import org.jboss.aop.pointcut.ast.ASTStart;
 import org.jboss.aop.pointcut.ast.ParseException;
 import org.jboss.aop.pointcut.ast.PointcutExpressionParser;

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/AbstractSearchKeyParserTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/AbstractSearchKeyParserTest.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/AbstractSearchKeyParserTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -582,10 +582,10 @@
       return (CalleeSearcher) negCalleeRestrictionField.get(restriction);
    }
    
-   public ParsedSearchKey getNegativeSearchKey(SearchKey searchKey, int index, int length) throws Exception
+   public SearchKey getNegativeSearchKey(SearchKey searchKey, int index, int length) throws Exception
    {
       ArrayList negativeSearchKeys = (ArrayList) negativeSearchKeyField.get(searchKey);
       assertEquals(length, negativeSearchKeys.size());
-      return (ParsedSearchKey) negativeSearchKeys.get(index);
+      return (SearchKey) negativeSearchKeys.get(index);
    }
 }
\ No newline at end of file

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/AllTests.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/AllTests.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/AllTests.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -36,6 +36,8 @@
       TestSuite suite = new TestSuite("Test for org.jboss.aop.joinpoint.graph");
       //$JUnit-BEGIN$
       suite.addTestSuite(MainJoinPointGraphTest.class);
+      suite.addTestSuite(UnitaryJoinPointGraphTest.class);
+      suite.addTestSuite(DomainJoinPointGraphTest.class);
       suite.addTest(SearchKeyParserTest.suite());
       suite.addTestSuite(TypedefParserTest.class);
       suite.addTestSuite(EmptySearchKeyTest.class);

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/BehaviorSearchKeyParserTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/BehaviorSearchKeyParserTest.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/BehaviorSearchKeyParserTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -23,6 +23,7 @@
 
 import java.lang.reflect.Modifier;
 
+import org.jboss.aop.AspectManager;
 import org.jboss.aop.joinpoint.graph.BehaviorSearcher.SearchType;
 import org.jboss.aop.pointcut.Pointcut;
 import org.jboss.aop.pointcut.PointcutExpression;
@@ -41,7 +42,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "construction(Pojo->new())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo", "new#",
             SearchType.CONSTRUCTION);
       assertNull(filter);
@@ -51,7 +52,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "construction(Pojo->new(.., @TestAnnotation))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo", "new#*||",
             SearchType.CONSTRUCTION);
       assertDescParamFilter(filter, null, "@TestAnnotation");
@@ -62,7 +63,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "construction(Pojo->@TestAnnotation())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "@TestAnnotation#", SearchType.CONSTRUCTION);
       assertNull(filter);
@@ -72,7 +73,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "construction(Pojo->@TestAnnotation($instanceof{@Pojo}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "@TestAnnotation#||", SearchType.CONSTRUCTION);
       assertAscParamFilter(filter, "$instanceof{@Pojo}");
@@ -82,7 +83,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(Pojo->new(*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo", "new#||",
             SearchType.EXECUTION);
       assertNull(filter);
@@ -92,7 +93,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(Pojo->new(*, int, @TestAnnotation))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "new#||| int ||", SearchType.EXECUTION);
       assertAscParamFilter(filter, null, null, "@TestAnnotation");
@@ -102,7 +103,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(Pojo->@AnyAnnotation(*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "@AnyAnnotation#||", SearchType.EXECUTION);
       assertNull(filter);
@@ -112,7 +113,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(public void Pojo->method(int))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       ASTAttribute attribute = new ASTAttribute(0);
       attribute.setValue(Modifier.PUBLIC);
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
@@ -124,7 +125,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(public void Pojo->method(int, org.jboss.*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       ASTAttribute attribute = new ASTAttribute(0);
       attribute.setValue(Modifier.PUBLIC);
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
@@ -136,7 +137,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution(public void Pojo->$implements{Interface}(int))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       ASTAttribute attribute = new ASTAttribute(0);
       attribute.setValue(Modifier.PUBLIC);
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
@@ -148,7 +149,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution(public void Pojo->$implementing{Interface}())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       ASTAttribute attribute = new ASTAttribute(0);
       attribute.setValue(Modifier.PUBLIC);
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
@@ -160,7 +161,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution(public void Pojo->$implementing{Interface}(a*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       ASTAttribute attribute = new ASTAttribute(0);
       attribute.setValue(Modifier.PUBLIC);
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
@@ -173,7 +174,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(public void Pojo->@TestAnnotation(int))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       ASTAttribute attribute = new ASTAttribute(0);
       attribute.setValue(Modifier.PUBLIC);
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
@@ -185,7 +186,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution(void Pojo->@org.MyAnnotation())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| @org.MyAnnotation#", SearchType.EXECUTION);
       assertNull(filter);
@@ -195,7 +196,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(public void Pojo->@TestAnnotation($instanceof{java.lang.Object}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       ASTAttribute attribute = new ASTAttribute(0);
       attribute.setValue(Modifier.PUBLIC);
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
@@ -207,7 +208,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution($typedef{typedef} Pojo->method(int))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "TypedefClass| method#| int  ", SearchType.EXECUTION);
       assertReturnTypeFilter(filter, "$typedef{typedef}");
@@ -218,7 +219,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution($typedef{typedef} Pojo->$implementing{org.jboss.Interface}" +
             "(java.lang.String, java.lang.String))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "TypedefClass| *#| java.lang.String | java.lang.String  ",
             SearchType.EXECUTION);
@@ -230,7 +231,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution($typedef{typedef} Pojo->method(int*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "TypedefClass| method#||", SearchType.EXECUTION);
       assertReturnTypeFilter(getConjSubFilter1(filter), "$typedef{typedef}");
@@ -241,7 +242,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution($typedef{typedef} Pojo->$implements{P*}(int*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "TypedefClass| *#||", SearchType.EXECUTION);
       BehaviorFilter subFilter = getConjSubFilter1(filter);
@@ -254,7 +255,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution($instanceof{package.MyInterface} Pojo->method(java.lang.String, long))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| method#| java.lang.String | long  ", SearchType.EXECUTION);
       assertReturnTypeFilter(filter, "$instanceof{package.MyInterface}");
@@ -264,7 +265,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution($instanceof{package.MyInterface} Pojo->$implementing{P*}())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| *#", SearchType.EXECUTION);
       assertReturnTypeFilter(getConjSubFilter1(filter), "$instanceof{package.MyInterface}");
@@ -275,7 +276,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution($instanceof{package.MyInterface} Pojo->method(.., java.lang.String, $typedef{typedef}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| method#|* java.lang.String | TypedefClass  ", SearchType.EXECUTION);
       assertReturnTypeFilter(getConjSubFilter1(filter),
@@ -287,7 +288,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution($instanceof{package.MyInterface} Pojo->$implements{*}(.., java.lang.String, $typedef{typedef}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| *#|* java.lang.String | TypedefClass  ", SearchType.EXECUTION);
       BehaviorFilter subFilter = getConjSubFilter1(filter);
@@ -301,7 +302,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution(@org.MyAnnotation Pojo->method())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| method#", SearchType.EXECUTION);
       assertReturnTypeFilter(filter, "@org.MyAnnotation");
@@ -311,7 +312,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution(@org.MyAnnotation Pojo->$implementing{@AnyAnnotation}())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| *#", SearchType.EXECUTION);
       assertReturnTypeFilter(getConjSubFilter1(filter), "@org.MyAnnotation");
@@ -322,7 +323,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution(@org.MyAnnotation Pojo->method(a*, .., a*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| method#||*||", SearchType.EXECUTION);
       assertReturnTypeFilter(getConjSubFilter1(filter), "@org.MyAnnotation");
@@ -335,7 +336,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution(@org.MyAnnotation Pojo->$implements{@AnyAnnotation}(a*, .., a*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| *#||*||", SearchType.EXECUTION);
       BehaviorFilter subFilter = getConjSubFilter1(filter);
@@ -350,7 +351,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution($instanceof{@org.MyAnnotation} Pojo->method())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
          "*| method#", SearchType.EXECUTION);
       assertReturnTypeFilter(filter, "$instanceof{@org.MyAnnotation}");
@@ -360,7 +361,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution($instanceof{@org.MyAnnotation} Pojo->$implementing{Interface}())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
          "*| *#", SearchType.EXECUTION);
       assertReturnTypeFilter(getConjSubFilter1(filter), "$instanceof{@org.MyAnnotation}");
@@ -371,7 +372,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution($instanceof{@org.MyAnnotation} Pojo->method(a*, .., a*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
          "*| method#||*||", SearchType.EXECUTION);
       assertReturnTypeFilter(getConjSubFilter1(filter), "$instanceof{@org.MyAnnotation}");
@@ -384,7 +385,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution($instanceof{@org.MyAnnotation} Pojo->$implements{*}(a*, .., a*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
          "*| *#||*||", SearchType.EXECUTION);
       BehaviorFilter subFilter = getConjSubFilter1(filter);
@@ -399,7 +400,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution(@org.PojoAnnotation Pojo->method(.., a*, .., a*, .., a*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| method#*||*||*||", SearchType.EXECUTION);
       assertReturnTypeFilter(getConjSubFilter1(filter), "@org.PojoAnnotation");
@@ -411,7 +412,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution(@org.PojoAnnotation Pojo->$implementing{AnyInterface}(.., a*, .., a*, .., a*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| *#*||*||*||", SearchType.EXECUTION);
       BehaviorFilter subFilter = getConjSubFilter1(filter);
@@ -425,7 +426,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode(Pojo->new(*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo", "new#||",
             SearchType.CALL);
       assertNull(filter);
@@ -435,7 +436,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode(Pojo->new(*, .., int, @TestAnnotation))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "new#||* int ||", SearchType.CALL);
       assertDescParamFilter(filter, null, null, null, "@TestAnnotation");
@@ -445,7 +446,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode(Pojo->@AnyAnnotation(int))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "@AnyAnnotation#| int  ", SearchType.CALL);
       assertNull(filter);
@@ -455,7 +456,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode(private !static void Pojo->method(org.jboss.aop.Pojo))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       ASTAttribute attribute1 = new ASTAttribute(0);
       attribute1.setValue(Modifier.PRIVATE);
       ASTAttribute attribute2 = new ASTAttribute(0);
@@ -471,7 +472,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode(protected !final void Pojo->$implements{java.io.Serializable}(org.jboss.aop.Pojo))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       ASTAttribute attribute1 = new ASTAttribute(0);
       attribute1.setValue(Modifier.PROTECTED);
       ASTAttribute attribute2 = new ASTAttribute(0);
@@ -487,7 +488,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode(void Pojo->method(int, org.jboss.*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||", SearchType.CALL);
       assertAscParamFilter(filter, null, "org.jboss.*");
@@ -497,7 +498,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode(void Pojo->$implementing{java.util.Comparable}(int, org.jboss.*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| *#| int ||", SearchType.CALL);
       assertImplementFilter(getConjSubFilter1(filter), false, "java.util.Comparable");
@@ -508,7 +509,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode(void Pojo->@TestAnnotation(int))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| @TestAnnotation#| int  ", SearchType.CALL);
       assertNull(filter);
@@ -518,7 +519,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode(int Pojo->@TestAnnotation($instanceof{@Annotation}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "int| @TestAnnotation#||", SearchType.CALL);
       assertAscParamFilter(filter, "$instanceof{@Annotation}");
@@ -528,7 +529,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode($typedef{typedef} Pojo->method())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "TypedefClass| method#", SearchType.CALL);
       assertReturnTypeFilter(filter, "$typedef{typedef}");
@@ -538,7 +539,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode($typedef{typedef} Pojo->$implements{java.*}())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "TypedefClass| *#", SearchType.CALL);
       assertReturnTypeFilter(getConjSubFilter1(filter), "$typedef{typedef}");
@@ -549,7 +550,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution($typedef{typedef} Pojo->method(@Annotation))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "TypedefClass| method#||", SearchType.CALL);
       assertReturnTypeFilter(getConjSubFilter1(filter), "$typedef{typedef}");
@@ -560,7 +561,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution($typedef{typedef} Pojo->$implementing{*}(@Annotation))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "TypedefClass| *#||", SearchType.CALL);
       BehaviorFilter subFilter = getConjSubFilter1(filter);
@@ -573,7 +574,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "withincode(" +
             "$instanceof{package.MyInterface} Pojo->method(java.util.Collection))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| method#| java.util.Collection  ", SearchType.CALL);
       assertReturnTypeFilter(filter, "$instanceof{package.MyInterface}");
@@ -583,7 +584,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "withincode(" +
             "$instanceof{package.MyInterface} Pojo->$implements{DummyInterface}(java.util.Collection))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| *#| java.util.Collection  ", SearchType.CALL);
       assertReturnTypeFilter(getConjSubFilter1(filter), "$instanceof{package.MyInterface}");
@@ -594,7 +595,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "withincode(" +
             "$instanceof{package.MyInterface} Pojo->method(.., int, $typedef{typedef}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| method#|* int | TypedefClass  ", SearchType.CALL);
       assertReturnTypeFilter(getConjSubFilter1(filter),
@@ -606,7 +607,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "withincode(" +
             "$instanceof{package.MyInterface} Pojo->$implementing{Dummy*}(.., int, $typedef{typedef}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| *#|* int | TypedefClass  ", SearchType.CALL);
       BehaviorFilter subFilter = getConjSubFilter1(filter);
@@ -620,7 +621,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "withincode(@org.MyAnnotation Pojo->method())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| method#", SearchType.CALL);
       assertReturnTypeFilter(filter, "@org.MyAnnotation");
@@ -630,7 +631,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "withincode(@org.MyAnnotation Pojo->$implements{java.security.Principal}())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| *#", SearchType.CALL);
       assertReturnTypeFilter(getConjSubFilter1(filter), "@org.MyAnnotation");
@@ -641,7 +642,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "withincode(@org.MyAnnotation Pojo->method(a*, .., a*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| method#||*||", SearchType.CALL);
       assertReturnTypeFilter(getConjSubFilter1(filter), "@org.MyAnnotation");
@@ -654,7 +655,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "withincode(@org.MyAnnotation Pojo->$implementing{java.security.*}(a*, .., a*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| *#||*||", SearchType.CALL);
       BehaviorFilter subFilter = getConjSubFilter1(filter);
@@ -669,7 +670,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "withincode($instanceof{@org.MyAnnotation} Pojo->method())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
          "*| method#", SearchType.CALL);
       assertReturnTypeFilter(filter, "$instanceof{@org.MyAnnotation}");
@@ -679,7 +680,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "withincode($instanceof{@org.MyAnnotation} Pojo->$implements{Interface*}())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
          "*| *#", SearchType.CALL);
       assertReturnTypeFilter(getConjSubFilter1(filter), "$instanceof{@org.MyAnnotation}");
@@ -690,7 +691,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "withincode($instanceof{@org.MyAnnotation} Pojo->method(a*, .., a*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
          "*| method#||*||", SearchType.CALL);
       assertReturnTypeFilter(getConjSubFilter1(filter), "$instanceof{@org.MyAnnotation}");
@@ -703,7 +704,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "withincode($instanceof{@org.MyAnnotation} Pojo->$implementing{org.*Interface}(a*, .., a*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
          "*| *#||*||", SearchType.CALL);
       BehaviorFilter subFilter = getConjSubFilter1(filter);
@@ -718,7 +719,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "withincode(@org.PojoAnnotation Pojo->method(.., a*, .., a*, .., a*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| method#*||*||*||", SearchType.CALL);
       assertReturnTypeFilter(getConjSubFilter1(filter), "@org.PojoAnnotation");
@@ -730,7 +731,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "withincode(@org.PojoAnnotation Pojo->$implements{java.rmi.Remote}(.., a*, .., a*, .., a*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "*| *#*||*||*||", SearchType.CALL);
       BehaviorFilter subFilter = getConjSubFilter1(filter);

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/ClassSearchKeyParserTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/ClassSearchKeyParserTest.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/ClassSearchKeyParserTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -21,6 +21,7 @@
  */
 package org.jboss.aop.joinpoint.graph;
 
+import org.jboss.aop.AspectManager;
 import org.jboss.aop.pointcut.Pointcut;
 import org.jboss.aop.pointcut.PointcutExpression;
 
@@ -36,7 +37,7 @@
    public void testAll() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all(org.company.Pojo)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertAllSearchKey(searchKey, "org.company.Pojo");
       assertNull(filter);
    }
@@ -44,7 +45,7 @@
    public void testAllWildcards1() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all(org.company.*.Pojo)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertAllSearchKey(searchKey, "org.company.*.Pojo");
       assertNull(filter);
    }
@@ -52,7 +53,7 @@
    public void testAllWildcards2() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all(*)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertAllSearchKey(searchKey, "*");
       assertNull(filter);
    }
@@ -60,7 +61,7 @@
    public void testAllWildcards3() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all(*Pojo)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertAllSearchKey(searchKey, "*Pojo");
       assertNull(filter);
    }
@@ -68,7 +69,7 @@
    public void testAllWildcards4() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all(Pojo*)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertAllSearchKey(searchKey, "Pojo*");
       assertNull(filter);
    }
@@ -76,7 +77,7 @@
    public void testAllAnnotation1() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all(@org.company.AnyAnnotation)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertAllSearchKey(searchKey, "@org.company.AnyAnnotation");
       assertNull(filter);
    }
@@ -84,7 +85,7 @@
    public void testAllAnnotation2() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all(@*)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertAllSearchKey(searchKey, "@*");
       assertNull(filter);
    }
@@ -92,7 +93,7 @@
    public void testAllAnnotation3() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all(@*Annotation)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertAllSearchKey(searchKey, "@*Annotation");
       assertNull(filter);
    }
@@ -100,7 +101,7 @@
    public void testAllInstanceof1() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all($instanceof{org.company.Pojo})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeAllSearchKey(searchKey, "org.company.Pojo");
       assertNull(filter);
    }
@@ -108,7 +109,7 @@
    public void testAllInstanceof2() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all($instanceof{java.lang.Object})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeAllSearchKey(searchKey, "java.lang.Object");
       assertNull(filter);
    }
@@ -116,7 +117,7 @@
    public void testAllInstanceof3() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all($instanceof{org.jboss.aop.Pojo})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeAllSearchKey(searchKey, "org.jboss.aop.Pojo");
       assertNull(filter);
    }
@@ -124,7 +125,7 @@
    public void testAllInstanceofAnnotated1() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all($instanceof{@AnyInterface})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeAllSearchKey(searchKey, "@AnyInterface");
       assertNull(filter);
    }
@@ -132,7 +133,7 @@
    public void testAllInstanceofAnnotated2() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all($instanceof{@*})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeAllSearchKey(searchKey, "@*");
       assertNull(filter);
    }
@@ -140,7 +141,7 @@
    public void testAllInstanceofAnnotated3() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all($instanceof{@Annotation*})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeAllSearchKey(searchKey, "@Annotation*");
       assertNull(filter);
    }
@@ -148,7 +149,7 @@
    public void testAllTypedef() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "all($typedef{typedef})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertAllSearchKey(searchKey, "TypedefClass");
       assertTypedefFilter(filter, "typedef");
    }
@@ -156,7 +157,7 @@
    public void testWithin() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within(org.company.Pojo)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertWithinSearchKey(searchKey, "org.company.Pojo");
       assertNull(filter);
    }
@@ -164,7 +165,7 @@
    public void testWithinWildcards1() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within(org.company.*.Pojo)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertWithinSearchKey(searchKey, "org.company.*.Pojo");
       assertNull(filter);
    }
@@ -172,7 +173,7 @@
    public void testWithinWildcards2() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within(*)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertWithinSearchKey(searchKey, "*");
       assertNull(filter);
    }
@@ -180,7 +181,7 @@
    public void testWithinWildcards3() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within(*Pojo)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertWithinSearchKey(searchKey, "*Pojo");
       assertNull(filter);
    }
@@ -188,7 +189,7 @@
    public void testWithinWildcards4() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within(Pojo*)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertWithinSearchKey(searchKey, "Pojo*");
       assertNull(filter);
    }
@@ -196,7 +197,7 @@
    public void testWithinAnnotation1() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within(@org.company.AnyAnnotation)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertWithinSearchKey(searchKey, "@org.company.AnyAnnotation");
       assertNull(filter);
    }
@@ -204,7 +205,7 @@
    public void testWithinAnnotation2() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within(@*)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertWithinSearchKey(searchKey, "@*");
       assertNull(filter);
    }
@@ -212,7 +213,7 @@
    public void testWithinAnnotation3() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within(@*Annotation)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertWithinSearchKey(searchKey, "@*Annotation");
       assertNull(filter);
    }
@@ -220,7 +221,7 @@
    public void testWithinInstanceof1() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within($instanceof{org.company.Pojo})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeWithinSearchKey(searchKey, "org.company.Pojo");
       assertNull(filter);
    }
@@ -228,7 +229,7 @@
    public void testWithinInstanceof2() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within($instanceof{java.lang.Object})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeWithinSearchKey(searchKey, "java.lang.Object");
       assertNull(filter);
    }
@@ -236,7 +237,7 @@
    public void testWithinInstanceof3() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within($instanceof{org.jboss.aop.Pojo})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeWithinSearchKey(searchKey, "org.jboss.aop.Pojo");
       assertNull(filter);
    }
@@ -244,7 +245,7 @@
    public void testWithinInstanceofAnnotated1() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within($instanceof{@AnyInterface})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeWithinSearchKey(searchKey, "@AnyInterface");
       assertNull(filter);
    }
@@ -252,7 +253,7 @@
    public void testWithinInstanceofAnnotated2() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within($instanceof{@*})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeWithinSearchKey(searchKey, "@*");
       assertNull(filter);
    }
@@ -260,7 +261,7 @@
    public void testWithinInstanceofAnnotated3() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within($instanceof{@Annotation*})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeWithinSearchKey(searchKey, "@Annotation*");
       assertNull(filter);
    }
@@ -268,7 +269,7 @@
    public void testWithinTypedef() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "within($typedef{typedef})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertWithinSearchKey(searchKey, "TypedefClass");
       assertTypedefFilter(filter, "typedef");
    }
@@ -276,7 +277,7 @@
    public void testAnnotation1() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "construction(@org.company.AnyAnnotation->new(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter behaviorFilter = assertBehaviorSearchKey(searchKey,
             "@org.company.AnyAnnotation", "new#*",
             BehaviorSearcher.SearchType.CONSTRUCTION);
@@ -287,7 +288,7 @@
    public void testAnnotation2() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "execution(@*->new(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter behaviorFilter = assertBehaviorSearchKey(searchKey, "@*",
             "new#*", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(behaviorFilter);
@@ -298,7 +299,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
                "execution(int @*Annotation->execute())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter behaviorFilter = assertBehaviorSearchKey(searchKey,
             "@*Annotation", "int| execute#", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(behaviorFilter);
@@ -309,7 +310,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode($instanceof{org.company.Pojo}->@Annotation(int, long, char))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeBehaviorSearchKey(searchKey,
             "org.company.Pojo", "@Annotation#| int | long | char  ",
             BehaviorSearcher.SearchType.CALL);
@@ -320,7 +321,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode(void $instanceof{java.lang.Object}->doIt())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeBehaviorSearchKey(searchKey,
             "java.lang.Object", "void| doIt#", BehaviorSearcher.SearchType.CALL);
       assertNull(filter);
@@ -329,7 +330,7 @@
    public void testInstanceof3() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "field(int $instanceof{org.jboss.aop.Pojo}->counter)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeFieldSearchKey(searchKey,
             "org.jboss.aop.Pojo","int counter", null, FieldSearcher.SearchType.ALL);
       assertNull(filter);
@@ -339,7 +340,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "get(java.lang.String $instanceof{@AnyInterface}->id)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeFieldSearchKey(searchKey, "@AnyInterface",
             "java.lang.String id", null, FieldSearcher.SearchType.READ);
       assertNull(filter);
@@ -349,7 +350,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "set(java.util.Date $instanceof{@*}->currentDate)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       TypeFilter filter = assertSubtypeFieldSearchKey(searchKey, "@*",
             "java.util.Date currentDate", null, FieldSearcher.SearchType.WRITE);
       assertNull(filter);
@@ -359,7 +360,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode($typedef{typedef}->new(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter behaviorFilter = assertBehaviorSearchKey(searchKey,
             "TypedefClass", "new#*", BehaviorSearcher.SearchType.CALL);
       assertNull(behaviorFilter);

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/CompositeSearchKeyParserTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/CompositeSearchKeyParserTest.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/CompositeSearchKeyParserTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -23,6 +23,7 @@
 
 import java.lang.reflect.Modifier;
 
+import org.jboss.aop.AspectManager;
 import org.jboss.aop.pointcut.Pointcut;
 import org.jboss.aop.pointcut.PointcutExpression;
 import org.jboss.aop.pointcut.ast.ASTAttribute;
@@ -38,7 +39,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "call(* org.jboss.Pojo->*(..)) AND withincode(void $instanceof{PojoClient}->*(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "void| *#*");
       assertSimpleCalleeRestriction(callee, "org.jboss.Pojo|*| *#*");
@@ -48,7 +49,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "call(* org.jboss.Pojo->*(..)) AND within($instanceof{PojoClient})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "*");
       assertSimpleCalleeRestriction(callee, "org.jboss.Pojo|*| *#*");
@@ -58,7 +59,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "within($instanceof{PojoClient}) AND call(* org.jboss.Pojo->*(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "*");
       assertSimpleCalleeRestriction(callee, "org.jboss.Pojo|*| *#*");
@@ -68,7 +69,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "within($instanceof{PojoClient}) AND !call(* org.jboss.Pojo->*(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "*");
       callee = assertNegativeCalleeRestriction(callee);
@@ -79,7 +80,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "call(* org.jboss.Pojo->*(..)) AND within($instanceof{PojoClient}) AND withincode(*->new())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       SearchKey searchKey1 = getSearchKey1(searchKey, true);
       SearchKey searchKey2 = getSearchKey2(searchKey, true);
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey2,
@@ -94,7 +95,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
          "call(* org.jboss.Pojo->*(..)) AND within($instanceof{PojoClient}) " +
          "AND withincode(*->new()) AND within(*) AND withincode(*->@AnyAnnotation())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       SearchKey searchKey2 = getSearchKey2(searchKey, true);
       CalleeSearcher callee = assertBehaviorCallSearchKey(searchKey2, "*", "@AnyAnnotation#");
       assertNull(callee);
@@ -117,7 +118,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "call(* org.jboss.Pojo->*(..)) AND call(* *->@AnyAnnotation(int)) " +
             "AND withincode(void $instanceof{PojoClient}->*(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "void| *#*");
       assertSimpleCalleeRestriction(getRestriction1(callee, true), "org.jboss.Pojo|*| *#*");
@@ -129,7 +130,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "!(call(* org.jboss.Pojo->*(..)) AND call(* *->@AnyAnnotation(int))) " +
             "AND withincode(void $instanceof{PojoClient}->*(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "void| *#*");
       callee = assertNegativeCalleeRestriction(callee);
@@ -142,7 +143,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "withincode(void $instanceof{PojoClient}->*(..)) AND" +
             "!(call(* org.jboss.Pojo->*(..)) AND call(* *->@AnyAnnotation(int)))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "void| *#*");
       callee = assertNegativeCalleeRestriction(callee);
@@ -155,7 +156,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
          "call(* org.jboss.Pojo->*(..)) AND (within($instanceof{PojoClient}) OR " +
          "withincode(*->new()))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       SearchKey searchKey1 = getSearchKey1(searchKey, false);
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey1,
             "PojoClient", "*");
@@ -170,7 +171,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
          "call(* org.jboss.Pojo->*(..)) AND !(within($instanceof{PojoClient}) OR " +
          "withincode(*->new()))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertBehaviorCallSearchKey(searchKey, "*", "*");
       assertSimpleCalleeRestriction(callee, "org.jboss.Pojo|*| *#*");
       SearchKey negativeSearchKey = getNegativeSearchKey(searchKey, 0, 1);
@@ -187,7 +188,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
          "(within($instanceof{PojoClient}) OR withincode(*->new())) AND " +
          "call(* org.jboss.Pojo->*(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       SearchKey searchKey1 = getSearchKey1(searchKey, false);
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey1,
             "PojoClient", "*");
@@ -202,7 +203,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
          "!(within($instanceof{PojoClient}) OR withincode(*->new())) AND " +
          "call(* org.jboss.Pojo->*(..))"); 
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertBehaviorCallSearchKey(searchKey, "*", "*");
       assertSimpleCalleeRestriction(callee, "org.jboss.Pojo|*| *#*");
       SearchKey negativeSearchKey = getNegativeSearchKey(searchKey, 0, 1);
@@ -219,7 +220,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "within($instanceof{PojoClient}) AND (call(* org.jboss.Pojo->*(..)) OR" +
             " call(org.jboss.Pojo->new(..)) OR call(* org.jboss.Pojo2->*(..)))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "*");
       CalleeSearcher subCallee = getRestriction1(callee, false);
@@ -236,7 +237,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "(call(* org.jboss.Pojo->*(..)) OR call(org.jboss.Pojo->new(..)) OR " +
             "call(* org.jboss.Pojo2->*(..))) AND within($instanceof{PojoClient})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "*");
       CalleeSearcher subCallee = getRestriction1(callee, false);
@@ -253,7 +254,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "(within($instanceof{PojoClient}) OR within(org.jboss.aop.*)) AND " +
             "(call(* org.jboss.Pojo->*(..)) OR call(org.jboss.Pojo->new(..)))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(
             getSearchKey1(searchKey, false), "PojoClient", "*");
       assertSimpleCalleeRestriction(getRestriction1(callee, false),
@@ -273,7 +274,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "!(within($instanceof{PojoClient}) OR within(org.jboss.aop.*)) AND " +
             "(call(* org.jboss.Pojo->*(..)) OR call(org.jboss.Pojo->new(..)))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertBehaviorCallSearchKey(searchKey, "*", "*");
       assertSimpleCalleeRestriction(getRestriction1(callee, false),
             "org.jboss.Pojo|*| *#*");
@@ -293,7 +294,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "(within($instanceof{PojoClient}) OR within(org.jboss.aop.*)) AND " +
             "!(call(* org.jboss.Pojo->*(..)) OR call(org.jboss.Pojo->new(..)))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(
             getSearchKey1(searchKey, false), "PojoClient", "*");
       callee = assertNegativeCalleeRestriction(callee);
@@ -315,7 +316,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "!(within($instanceof{PojoClient}) OR within(org.jboss.aop.*)) AND " +
             "!(call(* org.jboss.Pojo->*(..)) OR call(org.jboss.Pojo->new(..)))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertBehaviorCallSearchKey(searchKey, "*", "*");
       callee = assertNegativeCalleeRestriction(callee);
       assertSimpleCalleeRestriction(getRestriction1(callee, false),
@@ -336,7 +337,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "!((within($instanceof{PojoClient}) OR within(org.jboss.aop.*)) AND " +
             "(call(* org.jboss.Pojo->*(..)) OR call(org.jboss.Pojo->new(..))))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       assertBehaviorSearchKey(getSearchKey1(searchKey, false), "*", "*",
          BehaviorSearcher.SearchType.ALL);
       assertFieldSearchKey(getSearchKey2(searchKey, false), "*", "*", null,
@@ -361,7 +362,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "call(* org.jboss.Pojo->*(..)) AND has(* *->*(int)) AND " +
             "withincode(void $instanceof{PojoClient}->*(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "void| *#*");
       assertSimpleCalleeRestriction(callee, "org.jboss.Pojo|*| *#*");
@@ -374,7 +375,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "call(* org.jboss.Pojo->*(..)) AND has(* *->*(int)) AND " +
             "withincode(void $typedef{typedef}->*(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertBehaviorCallSearchKey(searchKey,
             "TypedefClass", "void| *#*");
       assertSimpleCalleeRestriction(callee, "org.jboss.Pojo|*| *#*");
@@ -388,7 +389,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "call(* org.jboss.Pojo->*(..)) AND hasfield(int *->counter) AND " +
             "within($instanceof{PojoClient})");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "*");
       assertSimpleCalleeRestriction(callee, "org.jboss.Pojo|*| *#*");
@@ -401,7 +402,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "within($instanceof{PojoClient}) AND (call(* org.jboss.Pojo->*(..)) " +
             "OR hasfield(int *->counter))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       SearchKey subSearchKey = getSearchKey1(searchKey, true);
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(subSearchKey,
             "PojoClient", "*");
@@ -416,7 +417,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "within($instanceof{PojoClient}) AND call(* org.jboss.Pojo->*(..)) " +
             "OR hasfield(int *->counter)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "*");
       assertSimpleCalleeRestriction(callee, "org.jboss.Pojo|*| *#*");
@@ -427,7 +428,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "within($instanceof{PojoClient}) AND !call(* org.jboss.Pojo->*(..))" +
             " AND !has(void *->method())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "*");
       callee = assertNegativeCalleeRestriction(callee);
@@ -443,7 +444,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "call(* org.jboss.Pojo->*(..)) AND call(* *->@AnyAnnotation(int)) " +
             "AND withincode(void $instanceof{PojoClient}->*(..)) OR hasfield(int *->counter)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "void| *#*");
       assertSimpleCalleeRestriction(getRestriction1(callee, true), "org.jboss.Pojo|*| *#*");
@@ -455,7 +456,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "!(call(* org.jboss.Pojo->*(..)) AND call(* *->@AnyAnnotation(int)) AND has(*->new())) " +
             "AND withincode(void $instanceof{PojoClient}->*(..)) AND hasfield(int *->counter)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "void| *#*");
       assertNull(callee);
@@ -473,7 +474,7 @@
             "withincode(void $instanceof{PojoClient}->*(..)) AND" +
             "!(call(* org.jboss.Pojo->*(..)) AND call(* *->@AnyAnnotation(int))" +
             "OR hasfield(int *->counter))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey,
             "PojoClient", "void| *#*");
       assertNull(callee);
@@ -488,7 +489,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
          "call(* org.jboss.Pojo->*(..)) AND (within($instanceof{PojoClient}) OR " +
          "withincode(*->new())) AND has(*->new())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       SearchKey searchKey1 = getSearchKey1(searchKey, false);
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey1,
             "PojoClient", "*");
@@ -506,7 +507,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
          "call(* org.jboss.Pojo->*(..)) AND !(within($instanceof{PojoClient}) OR " +
          "withincode(*->new()) AND hasfield(int *->counter))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertBehaviorCallSearchKey(searchKey, "*", "*");
       assertSimpleCalleeRestriction(callee, "org.jboss.Pojo|*| *#*");
       SearchKey negativeSearchKey = getNegativeSearchKey(searchKey, 0, 1);
@@ -523,7 +524,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
          "call(* org.jboss.Pojo->*(..)) AND !(within($instanceof{PojoClient}) OR " +
          "withincode(*->new()) OR !hasfield(int *->counter))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       CalleeSearcher callee = assertBehaviorCallSearchKey(searchKey, "*", "*");
       assertSimpleCalleeRestriction(callee, "org.jboss.Pojo|*| *#*");
       SearchKey negativeSearchKey = getNegativeSearchKey(searchKey, 0, 1);
@@ -540,7 +541,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
          "has(* *->method()) AND (within($instanceof{PojoClient}) OR " +
          "withincode(*->new())) AND call(* org.jboss.Pojo->*(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       SearchKey searchKey1 = getSearchKey1(searchKey, false);
       CalleeSearcher callee = assertSubtypeBehaviorCallSearchKey(searchKey1,
             "PojoClient", "*");
@@ -557,7 +558,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(* *->*(..)) AND call(* *->*(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       assertTrue(searchKey instanceof EmptySearchKey);
    }
    
@@ -565,7 +566,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(* *->*(..)) AND field(* *->*)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       assertTrue(searchKey instanceof EmptySearchKey);
    }
    
@@ -573,7 +574,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(* *->*(..)) AND all(Pojo)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       assertAllSearchKey(getSearchKey1(searchKey, true), "Pojo");
       assertBehaviorSearchKey(getSearchKey2(searchKey, true), "*", "*| *#*",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -583,7 +584,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
          "execution(* *->*(..)) OR call(* *->*(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       assertBehaviorSearchKey(getSearchKey1(searchKey, false), "*", "*| *#*",
             BehaviorSearcher.SearchType.EXECUTION);
       CalleeSearcher callee = assertBehaviorCallSearchKey(
@@ -596,7 +597,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "field(int *->index) OR call(* *->*(..)) OR " +
             "execution(public void org.jboss.Pojo->method())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       SearchKey subSearchKey = getSearchKey1(searchKey, false);
       assertFieldSearchKey(getSearchKey1(subSearchKey, false), "*", "int index",
             null, FieldSearcher.SearchType.ALL);
@@ -615,7 +616,7 @@
             "field(int *->index) OR" +
             "(within(org.jboss.Pojo) AND call(* *->*(..)) AND call(*->new(..))) OR " +
             "execution(public void org.jboss.Pojo->method())");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       SearchKey subSearchKey = getSearchKey1(searchKey, false);
       assertFieldSearchKey(getSearchKey1(subSearchKey, false), "*", "int index",
             null, FieldSearcher.SearchType.ALL);
@@ -634,7 +635,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "get(int $typedef{typedef}->index) OR !(within(org.jboss.Pojo) AND " +
             "call(* *->*(..)) AND get(int org.jboss..->index))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       assertFieldSearchKey(searchKey, "TypedefClass",
             "int index", null, FieldSearcher.SearchType.READ);
       TypeFilter typeFilter = (TypeFilter) typeFilterField.get(searchKey);
@@ -646,7 +647,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "(execution(* *->*(..)) OR call(* *->*(..)) OR construction(*->new()))" +
             " AND has(void *->method()) AND hasfield($instanceof{Pojo} *->counter)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       SearchKey subSearchKey = getSearchKey1(searchKey, false);
       assertBehaviorSearchKey(getSearchKey1(subSearchKey, false), "*", "*| *#*",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -671,7 +672,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "(execution(* *->*(..)) OR call(* *->*(..)) OR construction(*->new()))" +
             " AND (has(void *->method()) OR hasfield($instanceof{Pojo} *->counter))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       SearchKey subSearchKey = getSearchKey1(searchKey, false);
       assertBehaviorSearchKey(getSearchKey1(subSearchKey, false), "*", "*| *#*",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -696,7 +697,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "(execution(* *->*(..)) OR call(* *->*(..)) OR construction(*->new()))" +
             " AND (has(void *->method()) OR !hasfield($instanceof{Pojo} *->counter))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       SearchKey subSearchKey = getSearchKey1(searchKey, false);
       assertBehaviorSearchKey(getSearchKey1(subSearchKey, false), "*", "*| *#*",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -724,7 +725,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "(execution(* *->*(..)) OR call(* *->*(..)) OR construction(*->new()))" +
             " AND !(has(void *->method()) OR hasfield($instanceof{Pojo} *->counter))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       SearchKey subSearchKey = getSearchKey1(searchKey, false);
       assertBehaviorSearchKey(getSearchKey1(subSearchKey, false), "*", "*| *#*",
             BehaviorSearcher.SearchType.EXECUTION);

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/ConjunctiveSearchKeyTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/ConjunctiveSearchKeyTest.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/ConjunctiveSearchKeyTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -31,10 +31,10 @@
 {
    public void test1()
    {
-      ParsedSearchKey searchKey1 = StandardSearchKeyTest.getAllSearchKey();
-      ParsedSearchKey searchKey2 = StandardSearchKeyTest.getRestrictionCall2SearchKey();
+      SearchKey searchKey1 = StandardSearchKeyTest.getAllSearchKey();
+      SearchKey searchKey2 = StandardSearchKeyTest.getRestrictionCall2SearchKey();
       
-      ParsedSearchKey searchKey = new ConjunctiveSearchKey(searchKey1, searchKey2);
+      SearchKey searchKey = new ConjunctiveSearchKey(searchKey1, searchKey2);
       searchKey = searchKey.finishParsing();
       searchKey.search(classTree, result);
       Util.assertCollection(result);
@@ -47,9 +47,9 @@
    
    public void test2()
    {
-      ParsedSearchKey searchKey1 = StandardSearchKeyTest.getAllCallSearchKey();
-      ParsedSearchKey searchKey2 = StandardSearchKeyTest.getRestrictionCall3SearchKey();
-      ParsedSearchKey searchKey = new ConjunctiveSearchKey(searchKey1, searchKey2);
+      SearchKey searchKey1 = StandardSearchKeyTest.getAllCallSearchKey();
+      SearchKey searchKey2 = StandardSearchKeyTest.getRestrictionCall3SearchKey();
+      SearchKey searchKey = new ConjunctiveSearchKey(searchKey1, searchKey2);
       searchKey = searchKey.finishParsing();
       searchKey.search(classTree, result);
       Util.assertCollection(result, pojo2GetPojo2_pojo5CalledByMethod,
@@ -66,10 +66,10 @@
    
    public void test3()
    {
-      ParsedSearchKey searchKey1 = StandardSearchKeyTest.getAllCallSearchKey();
-      ParsedSearchKey searchKey2 = StandardSearchKeyTest.getRestrictionCall3SearchKey();
-      ParsedSearchKey searchKey3 = new ConjunctiveSearchKey(searchKey1, searchKey2);
-      ParsedSearchKey searchKey = new ConjunctiveSearchKey(searchKey3,
+      SearchKey searchKey1 = StandardSearchKeyTest.getAllCallSearchKey();
+      SearchKey searchKey2 = StandardSearchKeyTest.getRestrictionCall3SearchKey();
+      SearchKey searchKey3 = new ConjunctiveSearchKey(searchKey1, searchKey2);
+      SearchKey searchKey = new ConjunctiveSearchKey(searchKey3,
             PointcutDelegatorTest.getAllPojo());
       searchKey = searchKey.finishParsing();
       searchKey.search(classTree, result);

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/DisjunctiveSearchKeyTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/DisjunctiveSearchKeyTest.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/DisjunctiveSearchKeyTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -31,7 +31,7 @@
 {
    public void testAllOrFilterSubtypeSearchKey() throws Exception
    {
-      ParsedSearchKey searchKey = new DisjunctiveSearchKey(
+      SearchKey searchKey = new DisjunctiveSearchKey(
             StandardSearchKeyTest.getFilterSubtypeSearchKey(),
             StandardSearchKeyTest.getAllSearchKey());
       assertSame(searchKey, searchKey.finishParsing());
@@ -84,7 +84,7 @@
    
    public void testSearchAllCallOrNegative7SearchKey()
    {
-      ParsedSearchKey searchKey = new DisjunctiveSearchKey(
+      SearchKey searchKey = new DisjunctiveSearchKey(
             StandardSearchKeyTest.getAllCallSearchKey(),
             StandardSearchKeyTest.getNegativeSearchKey7());
       assertSame(searchKey, searchKey.finishParsing());
@@ -129,7 +129,7 @@
    
    public void testRestrictionCallOrNegative6SearchKey()
    {
-      ParsedSearchKey searchKey = new DisjunctiveSearchKey(
+      SearchKey searchKey = new DisjunctiveSearchKey(
             StandardSearchKeyTest.getNegativeSearchKey6(),
             StandardSearchKeyTest.getRestrictionCallSearchKey());
       assertSame(searchKey, searchKey.finishParsing());
@@ -141,7 +141,7 @@
    
    public void testRestrictionCall2OrNegative5SearchKey()
    {
-      ParsedSearchKey searchKey = new DisjunctiveSearchKey(
+      SearchKey searchKey = new DisjunctiveSearchKey(
             StandardSearchKeyTest.getRestrictionCall2SearchKey(),
             StandardSearchKeyTest.getNegativeSearchKey5());
       assertSame(searchKey, searchKey.finishParsing());
@@ -158,7 +158,7 @@
    
    public void testRestrictionCall3OrNegative4SearchKey()
    {
-      ParsedSearchKey searchKey = new DisjunctiveSearchKey(
+      SearchKey searchKey = new DisjunctiveSearchKey(
             StandardSearchKeyTest.getRestrictionCall3SearchKey(),
             StandardSearchKeyTest.getNegativeSearchKey4());
       assertSame(searchKey, searchKey.finishParsing());
@@ -176,7 +176,7 @@
    
    public void testEmpty1OrNegative3SearchKey()
    {
-      ParsedSearchKey searchKey = new DisjunctiveSearchKey(
+      SearchKey searchKey = new DisjunctiveSearchKey(
             StandardSearchKeyTest.getEmptySearchKey(),
             StandardSearchKeyTest.getNegativeSearchKey3());
       searchKey = searchKey.finishParsing();
@@ -187,7 +187,7 @@
    
    public void testEmpty2OrNegative2SearchKey()
    {
-      ParsedSearchKey searchKey = new DisjunctiveSearchKey(
+      SearchKey searchKey = new DisjunctiveSearchKey(
             StandardSearchKeyTest.getNegativeSearchKey2(),
             StandardSearchKeyTest.getEmptySearchKey2());
       searchKey =  searchKey.finishParsing();
@@ -198,7 +198,7 @@
    
    public void testEmpty3OrNegative1SearchKey()
    {
-      ParsedSearchKey searchKey = new DisjunctiveSearchKey(
+      SearchKey searchKey = new DisjunctiveSearchKey(
             StandardSearchKeyTest.getEmptySearchKey3(),
             StandardSearchKeyTest.getNegativeSearchKey1());
       searchKey = searchKey.finishParsing();
@@ -256,7 +256,7 @@
    
    public void testEmpty4OrFilteredSearchKey() throws Exception
    {
-      ParsedSearchKey searchKey = new DisjunctiveSearchKey(
+      SearchKey searchKey = new DisjunctiveSearchKey(
             StandardSearchKeyTest.getEmptySearchKey4(),
             StandardSearchKeyTest.getFilteredSearchKey());
       searchKey = searchKey.finishParsing();
@@ -276,7 +276,7 @@
    
    public void testEmptyOrEmpty3OrEmpty2OrEmpty4SearchKey()
    {
-      ParsedSearchKey searchKey = new DisjunctiveSearchKey(
+      SearchKey searchKey = new DisjunctiveSearchKey(
             (new DisjunctiveSearchKey(new DisjunctiveSearchKey(
                   StandardSearchKeyTest.getEmptySearchKey(),
                   StandardSearchKeyTest.getEmptySearchKey3()),
@@ -289,7 +289,7 @@
    
    public void testAllOrFilterSubtypeOrAllCallOrNegative7SearchKey() throws Exception
    {
-      ParsedSearchKey searchKey = new DisjunctiveSearchKey(
+      SearchKey searchKey = new DisjunctiveSearchKey(
             new DisjunctiveSearchKey(new DisjunctiveSearchKey(
                   StandardSearchKeyTest.getFilterSubtypeSearchKey(),
                   StandardSearchKeyTest.getAllSearchKey()),

Added: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/DomainJoinPointGraphTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/DomainJoinPointGraphTest.java	                        (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/DomainJoinPointGraphTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.aop.joinpoint.graph;
+
+import org.jboss.aop.Domain;
+import org.jboss.aop.pointcut.Pointcut;
+import org.jboss.aop.pointcut.PointcutExpression;
+import org.jboss.aop.pointcut.Typedef;
+import org.jboss.aop.pointcut.TypedefExpression;
+
+/**
+ * 
+ * 
+ * @author  <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ */
+public class DomainJoinPointGraphTest extends FullScenarioBuilder
+{
+   public void test1() throws Exception
+   {
+      JoinPointGraph graph = new DomainJoinPointGraph((Domain)
+            pojo1DefaultConstruction.getAdvisor().getManager());
+      Pointcut pointcut = new PointcutExpression("anyconstruction",
+            "construction(*->new(..))");
+      Util.assertCollection(graph.search(pointcut), pojo1DefaultConstruction,
+            pojo1DefaultConstruction1, pojo1DefaultConstruction3,
+            pojo1IntConstruction);
+   }
+   
+   public void test2() throws Exception
+   {
+      Domain domain = (Domain) pojo3IntLongSomeMethodExec.getAdvisor().getManager();
+      JoinPointGraph graph = new DomainJoinPointGraph(domain);
+      Typedef typedef = new TypedefExpression("deprecated", "class($instanceof{@" +
+            Deprecated.class.getName() + "})");
+      domain.addTypedef(typedef);
+      Pointcut pointcut = new PointcutExpression("anyconstruction",
+            "construction($typedef{deprecated}->new(..)) OR " +
+            "execution(* $typedef{deprecated}->*(..)) OR " +
+            "call(* *->*(..))");
+      Util.assertCollection(graph.search(pointcut), pojo3DefaultConstruction,
+            pojo3IntLongConstruction, pojo3IntLongSomeMethodExec,
+            pojo3IntLongSomeMethodExec1, pojo3IntStringConstruction,
+            pojo3StringLongSomeMethodExec, pojo3StringLongSomeMethodExec1,
+            pojo3StringMethodExec, pojo3VoidMethodExec);
+   }
+}
\ No newline at end of file

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/FieldSearchKeyParserTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/FieldSearchKeyParserTest.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/FieldSearchKeyParserTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -23,6 +23,7 @@
 
 import java.lang.reflect.Modifier;
 
+import org.jboss.aop.AspectManager;
 import org.jboss.aop.joinpoint.graph.FieldSearcher.SearchType;
 import org.jboss.aop.pointcut.Pointcut;
 import org.jboss.aop.pointcut.PointcutExpression;
@@ -38,7 +39,7 @@
    public void testSimpleField() throws Exception
    {
       Pointcut pointcut = new PointcutExpression("pointcut", "field(int Pojo->name)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       assertFieldSearchKey(searchKey, "Pojo", "int name", null,
             FieldSearcher.SearchType.ALL);
    }
@@ -47,7 +48,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "get($typedef{typedef} Pojo->name)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       assertFieldSearchKey(searchKey, "Pojo",
             "TypedefClass name", "$typedef{typedef}", SearchType.READ);
    }
@@ -56,7 +57,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "set(private !static $instanceof{Object} Pojo->name)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       ASTAttribute attribute1 = new ASTAttribute(0);
       attribute1.setValue(Modifier.PRIVATE);
       ASTAttribute attribute2 = new ASTAttribute(0);
@@ -70,7 +71,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "field(public @AnyAnnotation Pojo->name)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       ASTAttribute attribute = new ASTAttribute(0);
       attribute.setValue(Modifier.PUBLIC);
       assertFieldSearchKey(searchKey, "Pojo", "* name", "@AnyAnnotation",
@@ -81,7 +82,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "field(* Pojo->@my.Annotation)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       assertFieldSearchKey(searchKey, "Pojo", "* @my.Annotation", null,
             FieldSearcher.SearchType.ALL);
    }
@@ -90,7 +91,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "get($instanceof{@AnyAnnotation} Pojo->name)");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       assertFieldSearchKey(searchKey, "Pojo", "* name",
             "$instanceof{@AnyAnnotation}", SearchType.READ);
    }

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/FullScenarioBuilder.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/FullScenarioBuilder.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/FullScenarioBuilder.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -36,6 +36,7 @@
 import org.jboss.aop.ConstructionInfo;
 import org.jboss.aop.ConstructorInfo;
 import org.jboss.aop.FieldInfo;
+import org.jboss.aop.GeneratedAdvisorDomain;
 import org.jboss.aop.JoinPointInfo;
 import org.jboss.aop.MethodByConInfo;
 import org.jboss.aop.MethodByMethodInfo;
@@ -371,7 +372,9 @@
    protected void buildScenario() throws Exception
    {
       // Pojo1
-      Advisor advisor = new AdvisorMock("Pojo1Advisor", Pojo1.class);
+      Advisor advisor = new AdvisorMock("Pojo1Advisor", Pojo1.class,
+            new GeneratedAdvisorDomain(AspectManager.instance(), "pojo1Domain",
+            Pojo1.class));
       // public static String field
       Field field = Pojo1.class.getField("field");
       pojo1FieldRead = new FieldInfo(advisor, field, 0, true);
@@ -467,7 +470,9 @@
       pojo2StringConstructorExec3 = pojo2StringConstructorExec.copy(instanceAdvisor3);
 
       // Pojo3
-      advisor = new AdvisorMock("Pojo3Advisor", Pojo3.class);
+      advisor = new AdvisorMock("Pojo3Advisor",Pojo3.class,
+            new GeneratedAdvisorDomain(AspectManager.instance(), "pojo3Domain",
+                  Pojo3.class));
       field = Pojo3.class.getField("intField");
       pojo3IntFieldRead = new FieldInfo(advisor, field, 0, true);
       pojo3IntFieldWrite = new FieldInfo(advisor, field, 0, false);

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/InstanceAdvisorMock.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/InstanceAdvisorMock.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/InstanceAdvisorMock.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -41,10 +41,13 @@
 class InstanceAdvisorMock extends Advisor implements InstanceAdvisor 
 {
    private Advised instance;
+   private static int counter = 0;
    
    public InstanceAdvisorMock(final Advisor advisor)
    {
-      super("anyName", new InstanceDomain(AspectManager.instance(), "anyName", true));
+      
+      super("anyName", new InstanceDomain(AspectManager.instance(),
+            advisor.getClazz().getName() + counter++, true));
       ((InstanceDomain) getManager()).setAdvisor(this);
       super.clazz = advisor.getClazz();
       super.constructors = clazz.getDeclaredConstructors();

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/MainJoinPointGraphTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/MainJoinPointGraphTest.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/MainJoinPointGraphTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -376,8 +376,7 @@
    private void assertExpression(String expression, JoinPointInfo... infos) throws Exception
    {
       Pointcut pointcut = new PointcutExpression("exp", expression);
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
-      Collection<JoinPointInfo> result = MainJoinPointGraph.getInstance().search(searchKey);
+      Collection<JoinPointInfo> result = MainJoinPointGraph.getInstance().search(pointcut);
       Util.assertCollection(result, infos);
       result = collectMatchedJoinPoints(pointcut);
       Util.assertCollection(result, infos);

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/ParamSearchKeyParserTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/ParamSearchKeyParserTest.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/ParamSearchKeyParserTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -39,7 +39,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "construction(Pojo->new(..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo", "new#*",
       BehaviorSearcher.SearchType.CONSTRUCTION);
       assertNull(filter);
@@ -49,7 +49,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method(int, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int * ",
       BehaviorSearcher.SearchType.EXECUTION);
@@ -60,7 +60,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method(.., int))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#|* int  ",
       BehaviorSearcher.SearchType.EXECUTION);
@@ -72,7 +72,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method(.., int))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#|* int  ",
       BehaviorSearcher.SearchType.EXECUTION);
@@ -84,7 +84,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method(.., int, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#|* int * ",
       BehaviorSearcher.SearchType.EXECUTION);
@@ -95,7 +95,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method(.., ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#|*",
       BehaviorSearcher.SearchType.EXECUTION);
@@ -106,7 +106,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method(.., .., int))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#|* int  ",
       BehaviorSearcher.SearchType.EXECUTION);
@@ -117,7 +117,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method(.., .., int, .., ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#|* int * ",
       BehaviorSearcher.SearchType.EXECUTION);
@@ -128,7 +128,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, int))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||| int  ",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -139,7 +139,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -150,7 +150,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, *, long))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||| long  ",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -161,7 +161,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -172,7 +172,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -183,7 +183,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(Pojo2, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| Pojo2 ||||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -194,7 +194,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, DummyAnnotationPojo, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||| DummyAnnotationPojo ||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -205,7 +205,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, long))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||| long  ",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -216,7 +216,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -227,7 +227,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, *, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||||||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -238,7 +238,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, *, int))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||| int  ",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -249,7 +249,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, *, DummyAnnotationPojo))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||| DummyAnnotationPojo  ",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -260,7 +260,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, long, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||| long ||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -270,7 +270,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, Pojo2, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||| Pojo2 ||||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -280,7 +280,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, Pojo2, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int | Pojo2 ||||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -291,7 +291,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, *, long, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||| long ||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -302,7 +302,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, *, *, DummyAnnotationPojo))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||||| DummyAnnotationPojo  ",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -313,7 +313,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, Pojo2, long, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||| Pojo2 | long ||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -324,7 +324,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, Pojo2, *, DummyAnnotationPojo))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||| Pojo2 ||| DummyAnnotationPojo  ",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -335,7 +335,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, long, DummyAnnotationPojo))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||| long | DummyAnnotationPojo  ",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -346,7 +346,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, Pojo2, long, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int | Pojo2 | long ||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -357,7 +357,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, Pojo2, *, DummyAnnotationPojo))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int | Pojo2 ||| DummyAnnotationPojo  ",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -368,7 +368,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, *, long, DummyAnnotationPojo))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||| long | DummyAnnotationPojo  ",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -379,7 +379,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, Pojo2, long, DummyAnnotationPojo))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||| Pojo2 | long | DummyAnnotationPojo  ",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -390,7 +390,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, *, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||||||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -400,7 +400,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, *, *, *, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||||||*", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -410,7 +410,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, *, *, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||||||||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -420,7 +420,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||*", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -430,7 +430,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(.., *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#*||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -440,7 +440,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(.., *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#*||||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -450,7 +450,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(.., *, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#*||||||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -460,7 +460,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(.., *, *, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#*||||||||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -470,7 +470,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(.., *, *, *, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#*||||||||||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -480,7 +480,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(.., *, *, *, *, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#*||||||||||||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -490,7 +490,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||*", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -500,7 +500,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, *, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||*", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -510,7 +510,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, *, *, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||||*", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -520,7 +520,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, *, *, *, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||||||*", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -530,7 +530,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, *, *, *, *, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||||||||*", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -540,7 +540,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, .., *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||*||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -550,7 +550,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, .., *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||*||||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -560,7 +560,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, .., *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||*||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -570,7 +570,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, .., *, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||*||||||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -580,7 +580,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, .., *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||*||||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -590,7 +590,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, *, .., *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||*||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -600,7 +600,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(.., int, *, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#|* int ||||||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -610,7 +610,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, .., *, *, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int *||||||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -620,7 +620,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, *, *, .., *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||||*||", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -630,7 +630,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, *, *, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||||*", BehaviorSearcher.SearchType.EXECUTION);
       assertNull(filter);
@@ -640,7 +640,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, *, *, DummyAnnotationPojo, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||||| DummyAnnotationPojo * ",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -651,7 +651,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, *, .., long, *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||* long ||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -662,7 +662,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, *, long, .., *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||| long *||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -673,7 +673,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, *, .., long, .., *))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||* long *||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -684,7 +684,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(@DummyAnnotation))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -695,7 +695,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(@DummyAnnotation, int))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||| int  ",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -706,7 +706,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, @DummyAnnotation, int))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||| int  ",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -717,7 +717,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(int, @DummyAnnotation, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#| int ||*",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -728,7 +728,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, *, @DummyAnnotation, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||*",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -739,7 +739,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(*, @AnyAnnotation, @DummyAnnotation, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||*",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -750,7 +750,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(@AnyAnnotation, *, @DummyAnnotation, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||*",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -761,7 +761,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method($instanceof{@AnyAnnotation}, *, $instanceof{Pojo}, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||*",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -773,7 +773,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(Pojo*, P*ojo*, *Pojo))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -784,7 +784,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(a*, *, P*ojo, ..))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||||*",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -795,7 +795,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(.., $instanceof{Pojo}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#*||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -806,7 +806,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(.., .., $instanceof{Pojo}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#*||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -817,7 +817,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(.., .., $instanceof{Pojo}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#*||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -828,7 +828,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
       "execution(void Pojo->method(.., int, .., $instanceof{Pojo}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#|* int *||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -840,7 +840,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method(.., int, .., $instanceof{Pojo}, long, *, " +
             "@AnyAnnotation))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#|* int *||| long ||||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -852,7 +852,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method(@AnyAnnotation, .., @DummyAnnotation))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||*||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -867,7 +867,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method(@AnyAnnotation, .., int, long, Pojo, .., " +
             "char, .., Pojo, @DummyAnnotation))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||* int | long | Pojo *| char *| Pojo ||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -884,7 +884,7 @@
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method(@AnyAnnotation, $instanceof{Pojo*}, .., " +
             "Pojo, @DummyAnnotation, $instanceof{@DummyAnnotation}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||||* Pojo ||||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -904,7 +904,7 @@
       AspectManager.instance().addTypedef(typedef);
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method($typedef{ComplexExp}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -919,7 +919,7 @@
       AspectManager.instance().addTypedef(typedef);
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method($typedef{ComplexExp}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -932,7 +932,7 @@
       AspectManager.instance().addTypedef(typedef);
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method($typedef{ComplexExp}))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||",
             BehaviorSearcher.SearchType.EXECUTION);
@@ -943,7 +943,7 @@
    {
       Pointcut pointcut = new PointcutExpression("pointcut",
             "execution(void Pojo->method($typedef{ComplexExp}, .., a*, b*, .., c*))");
-      SearchKey searchKey = SearchKeyParser.parse(pointcut);
+      SearchKey searchKey = SearchKeyParser.parse(pointcut, AspectManager.instance());
       BehaviorFilter filter = assertBehaviorSearchKey(searchKey, "Pojo",
             "void| method#||*||||*||",
       BehaviorSearcher.SearchType.EXECUTION);

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/PointcutDelegatorTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/PointcutDelegatorTest.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/PointcutDelegatorTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -113,7 +113,7 @@
             pojo2StringConstructorExec2, pojo2StringConstructorExec3);
    }
    
-   public static ParsedSearchKey getAllPojo()
+   public static SearchKey getAllPojo()
    {
       Pointcut pointcut = new Pointcut()
       {
@@ -221,7 +221,7 @@
       return new PointcutDelegator(pointcut);
    }
    
-   public static ParsedSearchKey getPojo1AndPojo2Cons()
+   public static SearchKey getPojo1AndPojo2Cons()
    {
       Pointcut pointcut = new Pointcut()
       {

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/StandardSearchKeyTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/StandardSearchKeyTest.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/StandardSearchKeyTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -39,7 +39,7 @@
 {
    public void testSearchAll()
    {
-      ParsedSearchKey searchKey = getAllSearchKey();
+      SearchKey searchKey = getAllSearchKey();
       searchKey.finishParsing();
       searchKey.search(classTree, result);
       Util.assertCollection(result, pojo1FieldRead, pojo1FieldWrite,
@@ -91,7 +91,7 @@
    
    public void testSearchAllCall()
    {
-      ParsedSearchKey searchKey = getAllCallSearchKey();
+      SearchKey searchKey = getAllCallSearchKey();
       assertSame(searchKey, searchKey.finishParsing());
       searchKey.search(classTree, result);
       Util.assertCollection(result, pojo1DefaultConstructor_pojo1IntConstructor,
@@ -133,7 +133,7 @@
    
    public void testSearchRestrictionCall()
    {
-      ParsedSearchKey searchKey = getRestrictionCallSearchKey();
+      SearchKey searchKey = getRestrictionCallSearchKey();
       assertSame(searchKey, searchKey.finishParsing());
       searchKey.search(classTree, result);
       Util.assertCollection(result, 
@@ -143,7 +143,7 @@
    
    public void testSearchRestrictionCall2()
    {
-      ParsedSearchKey searchKey = getRestrictionCall2SearchKey();
+      SearchKey searchKey = getRestrictionCall2SearchKey();
       assertSame(searchKey, searchKey.finishParsing());
       searchKey.search(classTree, result);
       Util.assertCollection(result, pojo2GetPojo2_pojo5CalledByMethod,
@@ -157,7 +157,7 @@
    
    public void testSearchRestrictionCall3()
    {
-      ParsedSearchKey searchKey = getRestrictionCall3SearchKey();
+      SearchKey searchKey = getRestrictionCall3SearchKey();
       assertSame(searchKey, searchKey.finishParsing());
       searchKey.search(classTree, result);
       Util.assertCollection(result, pojo2GetPojo2_pojo5CalledByMethod,
@@ -167,7 +167,7 @@
    
    public void testEmptySearchKey1()
    {
-      ParsedSearchKey searchKey = getEmptySearchKey();
+      SearchKey searchKey = getEmptySearchKey();
       SearchKey finalSearchKey = searchKey.finishParsing();
       finalSearchKey.search(classTree, result);
       Util.assertCollection(result);
@@ -176,7 +176,7 @@
    
    public void testEmptySearchKey2()
    {
-      ParsedSearchKey searchKey = getEmptySearchKey2();
+      SearchKey searchKey = getEmptySearchKey2();
       SearchKey finalSearchKey = searchKey.finishParsing();
       finalSearchKey.search(classTree, result);
       Util.assertCollection(result);
@@ -185,7 +185,7 @@
    
    public void testEmptySearchKey3()
    {
-      ParsedSearchKey searchKey = getEmptySearchKey3();
+      SearchKey searchKey = getEmptySearchKey3();
       SearchKey finalSearchKey = searchKey.finishParsing();
       finalSearchKey.search(classTree, result);
       Util.assertCollection(result);
@@ -194,7 +194,7 @@
    
    public void testEmptySearchKey4()
    {
-      ParsedSearchKey searchKey = getEmptySearchKey4();
+      SearchKey searchKey = getEmptySearchKey4();
       searchKey.addConjunctiveCalleeRestriction(new OptimizedCalleeSearcher("*.* @*(*)"));
       SearchKey finalSearchKey = searchKey.finishParsing();
       finalSearchKey.search(classTree, result);
@@ -204,7 +204,7 @@
    
    public void testFilteredSearchKey() throws Exception
    {
-      ParsedSearchKey searchKey = getFilteredSearchKey();
+      SearchKey searchKey = getFilteredSearchKey();
       assertSame(searchKey, searchKey.finishParsing());
       searchKey.search(classTree, result);
       Util.assertCollection(result, dummyAnnotationPojoMethodExec, 
@@ -222,7 +222,7 @@
    
    public void testNegativeSearchKey1() throws Exception
    {
-      ParsedSearchKey searchKey = getNegativeSearchKey1();
+      SearchKey searchKey = getNegativeSearchKey1();
       SearchKey finalSearchKey = searchKey.finishParsing();
       assertTrue(finalSearchKey instanceof DisjunctiveSearchKey);
       finalSearchKey.search(classTree, result);
@@ -279,7 +279,7 @@
    
    public void testNegativeSearchKey2() throws Exception
    {
-      ParsedSearchKey searchKey = getNegativeSearchKey2();
+      SearchKey searchKey = getNegativeSearchKey2();
       assertSame(searchKey, searchKey.finishParsing());
       searchKey.search(classTree, result);
       Util.assertCollection(result, anyAnnotationPojoIntConstruction, 
@@ -288,7 +288,7 @@
    
    public void testNegativeSearchKey3() throws Exception
    {
-      ParsedSearchKey searchKey = getNegativeSearchKey3();
+      SearchKey searchKey = getNegativeSearchKey3();
       assertSame(searchKey, searchKey.finishParsing());
       searchKey.search(classTree, result);
       Util.assertCollection(result, pojo3StringMethodExec,
@@ -297,7 +297,7 @@
    
    public void testNegativeSearchKey4() throws Exception
    {
-      ParsedSearchKey searchKey = getNegativeSearchKey4();
+      SearchKey searchKey = getNegativeSearchKey4();
       assertSame(searchKey, searchKey.finishParsing());
       searchKey.search(classTree, result);
       Util.assertCollection(result, pojo3StringMethod_pojo1IntConstructor,
@@ -311,7 +311,7 @@
    
    public void testNegativeSearchKey5() throws Exception
    {
-      ParsedSearchKey searchKey = getNegativeSearchKey5();
+      SearchKey searchKey = getNegativeSearchKey5();
       assertSame(searchKey, searchKey.finishParsing());
       searchKey.search(classTree, result);
       Util.assertCollection(result, pojo4CallMethod_pojo5DefaultConstructor,
@@ -321,7 +321,7 @@
    
    public void testNegativeSearchKey6() throws Exception
    {
-      ParsedSearchKey searchKey = getNegativeSearchKey6();
+      SearchKey searchKey = getNegativeSearchKey6();
       assertSame(searchKey, searchKey.finishParsing());
       searchKey.search(classTree, result);
       Util.assertCollection(result, pojo2Pojo3Read, pojo3DumbFieldRead,
@@ -330,7 +330,7 @@
    
    public void testNegativeSearchKey7() throws Exception
    {
-      ParsedSearchKey searchKey = getNegativeSearchKey7();
+      SearchKey searchKey = getNegativeSearchKey7();
       assertSame(searchKey, searchKey.finishParsing());
       searchKey.search(classTree, result);
       Util.assertCollection(result, pojo2Pojo3Read, pojo3DumbFieldRead,
@@ -339,7 +339,7 @@
    
    public void testFilterSubtypeSearchKey() throws Exception
    {
-      ParsedSearchKey searchKey = getFilterSubtypeSearchKey();
+      SearchKey searchKey = getFilterSubtypeSearchKey();
       assertSame(searchKey, searchKey.finishParsing());
       searchKey.search(classTree, result);
       Util.assertCollection(result, 
@@ -356,17 +356,17 @@
             dummyAnnotationPojo2InterfaceMethod2Exec);;
    }
    
-   public static ParsedSearchKey getAllSearchKey()
+   public static SearchKey getAllSearchKey()
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.setClassExpression("*", false);
       searchKey.setSearcher(AllSearcher.getInstance());
       return searchKey;
    }
    
-   public static ParsedSearchKey getAllCallSearchKey()
+   public static SearchKey getAllCallSearchKey()
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.setClassExpression("*", false);
       BehaviorSearcher behaviorSearcher = new BehaviorSearcher("*",
             new ArrayList<ASTAttribute>(), new ArrayList<ASTException>());
@@ -376,9 +376,9 @@
    }
 
    
-   public static ParsedSearchKey getRestrictionCallSearchKey()
+   public static SearchKey getRestrictionCallSearchKey()
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.setClassExpression("*", false);
       BehaviorSearcher behaviorSearcher = new BehaviorSearcher("*",
             new ArrayList<ASTAttribute>(), new ArrayList<ASTException>());
@@ -388,9 +388,9 @@
       return searchKey;
    }
    
-   public static ParsedSearchKey getRestrictionCall2SearchKey()
+   public static SearchKey getRestrictionCall2SearchKey()
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.setClassExpression("*", false);
       BehaviorSearcher behaviorSearcher = new BehaviorSearcher("*",
             new ArrayList<ASTAttribute>(), new ArrayList<ASTException>());
@@ -401,9 +401,9 @@
       return searchKey;
    }
    
-   public static ParsedSearchKey getRestrictionCall3SearchKey()
+   public static SearchKey getRestrictionCall3SearchKey()
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.setClassExpression("@*", false);
       BehaviorSearcher behaviorSearcher = new BehaviorSearcher("*",
             new ArrayList<ASTAttribute>(), new ArrayList<ASTException>());
@@ -414,9 +414,9 @@
       return searchKey;
    }
    
-   public static ParsedSearchKey getEmptySearchKey()
+   public static SearchKey getEmptySearchKey()
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.setClassExpression("@*", false);
       BehaviorSearcher behaviorSearcher = new BehaviorSearcher("*",
             new ArrayList<ASTAttribute>(), new ArrayList<ASTException>());
@@ -426,9 +426,9 @@
       return searchKey;
    }
    
-   public static ParsedSearchKey getEmptySearchKey2()
+   public static SearchKey getEmptySearchKey2()
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.setClassExpression("@*", false);
       BehaviorSearcher behaviorSearcher = new BehaviorSearcher("*",
             new ArrayList<ASTAttribute>(), new ArrayList<ASTException>());
@@ -438,18 +438,18 @@
       return searchKey;
    }
    
-   public static ParsedSearchKey getEmptySearchKey3()
+   public static SearchKey getEmptySearchKey3()
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.setClassExpression("@*", false);
       searchKey.setSearcher(AllSearcher.getInstance());
       searchKey.addConjunctiveCalleeRestriction(new OptimizedCalleeSearcher("*|*| @*#*"));
       return searchKey;
    }
    
-   public static ParsedSearchKey getEmptySearchKey4()
+   public static SearchKey getEmptySearchKey4()
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.setClassExpression("@*", false);
       FieldSearcher fieldSearcher = new FieldSearcher("*",
             new ArrayList<ASTAttribute>(), null);
@@ -459,9 +459,9 @@
       return searchKey;
    }
    
-   public static ParsedSearchKey getFilteredSearchKey() throws Exception
+   public static SearchKey getFilteredSearchKey() throws Exception
    {
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.setClassExpression("*", false);
       TypeFilter filter = new HasBehaviorFilter(TypeFilterTest.getASTBehavior(
             "* *->interfaceMethod*(..)")); 
@@ -470,24 +470,24 @@
       return searchKey;
    }
    
-   public static ParsedSearchKey getNegativeSearchKey1()
+   public static SearchKey getNegativeSearchKey1()
    {
-      ParsedSearchKey negativeSearchKey = new StandardSearchKey();
+      SearchKey negativeSearchKey = new StandardSearchKey();
       negativeSearchKey.setClassExpression("*", false);
       negativeSearchKey.setSearcher(AllSearcher.getInstance());
       assertSame(negativeSearchKey, negativeSearchKey.finishParsing());
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.addNegativeSearchKey(negativeSearchKey);
       return searchKey;
    }
    
-   public static ParsedSearchKey getNegativeSearchKey2()
+   public static SearchKey getNegativeSearchKey2()
    {
-      ParsedSearchKey negativeSearchKey = new StandardSearchKey();
+      SearchKey negativeSearchKey = new StandardSearchKey();
       negativeSearchKey.setClassExpression("*", false);
       negativeSearchKey.setSearcher(AllSearcher.getInstance());
       assertSame(negativeSearchKey, negativeSearchKey.finishParsing());
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.addNegativeSearchKey(negativeSearchKey);
       searchKey.setClassExpression(DummyInterface.class.getName(), true);
       BehaviorSearcher searcher = new BehaviorSearcher("*",
@@ -497,16 +497,16 @@
       return searchKey;
    }
    
-   public static ParsedSearchKey getNegativeSearchKey3()
+   public static SearchKey getNegativeSearchKey3()
    {
-      ParsedSearchKey negativeSearchKey = new StandardSearchKey();
+      SearchKey negativeSearchKey = new StandardSearchKey();
       negativeSearchKey.setClassExpression("*", false);
       BehaviorSearcher negativeSearcher = new BehaviorSearcher("void| *#*",
             new ArrayList<ASTAttribute>(), new ArrayList<ASTException>());
       negativeSearcher.setSearchType(SearchType.EXECUTION);
       negativeSearchKey.setSearcher(negativeSearcher);
       assertSame(negativeSearchKey, negativeSearchKey.finishParsing());
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.addNegativeSearchKey(negativeSearchKey);
       searchKey.setClassExpression("*", false);
       BehaviorSearcher searcher = new BehaviorSearcher("*| *od#*",
@@ -516,16 +516,16 @@
       return searchKey;
    }
    
-   public static ParsedSearchKey getNegativeSearchKey4()
+   public static SearchKey getNegativeSearchKey4()
    {
-      ParsedSearchKey negativeSearchKey = new StandardSearchKey();
+      SearchKey negativeSearchKey = new StandardSearchKey();
       negativeSearchKey.setClassExpression("*", false);
       BehaviorSearcher negativeSearcher = new BehaviorSearcher("void| *#*",
             new ArrayList<ASTAttribute>(), new ArrayList<ASTException>());
       negativeSearcher.setSearchType(SearchType.EXECUTION);
       negativeSearchKey.setSearcher(negativeSearcher);
       assertSame(negativeSearchKey, negativeSearchKey.finishParsing());
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.addNegativeSearchKey(negativeSearchKey);
       searchKey.setClassExpression("*", false);
       BehaviorSearcher searcher = new BehaviorSearcher("*| *od#*",
@@ -535,16 +535,16 @@
       return searchKey;
    }
    
-   public static ParsedSearchKey getNegativeSearchKey5()
+   public static SearchKey getNegativeSearchKey5()
    {
-      ParsedSearchKey negativeSearchKey = new StandardSearchKey();
+      SearchKey negativeSearchKey = new StandardSearchKey();
       negativeSearchKey.setClassExpression("*", false);
       BehaviorSearcher negativeSearcher = new BehaviorSearcher("java.lang.String| *#*",
             new ArrayList<ASTAttribute>(), new ArrayList<ASTException>());
       negativeSearcher.setSearchType(SearchType.CALL);
       negativeSearchKey.setSearcher(negativeSearcher);
       assertSame(negativeSearchKey, negativeSearchKey.finishParsing());
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.addNegativeSearchKey(negativeSearchKey);
       searchKey.setClassExpression("*", false);
       BehaviorSearcher searcher = new BehaviorSearcher("*| *od#*",
@@ -554,16 +554,16 @@
       return searchKey;
    }
    
-   public static ParsedSearchKey getNegativeSearchKey6()
+   public static SearchKey getNegativeSearchKey6()
    {
-      ParsedSearchKey negativeSearchKey = new StandardSearchKey();
+      SearchKey negativeSearchKey = new StandardSearchKey();
       negativeSearchKey.setClassExpression("*", false);
       BehaviorSearcher negativeSearcher = new BehaviorSearcher("java.lang.String| *#*",
             new ArrayList<ASTAttribute>(), new ArrayList<ASTException>());
       negativeSearcher.setSearchType(SearchType.CALL);
       negativeSearchKey.setSearcher(negativeSearcher);
       assertSame(negativeSearchKey, negativeSearchKey.finishParsing());
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.addNegativeSearchKey(negativeSearchKey);
       searchKey.setClassExpression("*", false);
       ASTAttribute attribute = new ASTAttribute(0);
@@ -577,16 +577,16 @@
       return searchKey;
    }
    
-   public static ParsedSearchKey getNegativeSearchKey7()
+   public static SearchKey getNegativeSearchKey7()
    {
-      ParsedSearchKey negativeSearchKey = new StandardSearchKey();
+      SearchKey negativeSearchKey = new StandardSearchKey();
       negativeSearchKey.setClassExpression("*", false);
       FieldSearcher negativeSearcher = new FieldSearcher("* *",
             new ArrayList<ASTAttribute>(), null);
       negativeSearcher.setSearchType(FieldSearcher.SearchType.WRITE);
       negativeSearchKey.setSearcher(negativeSearcher);
       assertSame(negativeSearchKey, negativeSearchKey.finishParsing());
-      ParsedSearchKey searchKey = new StandardSearchKey();
+      SearchKey searchKey = new StandardSearchKey();
       searchKey.addNegativeSearchKey(negativeSearchKey);
       searchKey.setClassExpression("*", false);
       ASTAttribute attribute = new ASTAttribute(0);
@@ -600,9 +600,9 @@
       return searchKey;
    }
    
-   public static ParsedSearchKey getFilterSubtypeSearchKey() throws Exception
+   public static SearchKey getFilterSubtypeSearchKey() throws Exception
    {
-      ParsedSearchKey  searchKey = new StandardSearchKey();
+      SearchKey  searchKey = new StandardSearchKey();
       searchKey.setClassExpression(Object.class.getName(), true);
       TypeFilter filter = new HasBehaviorFilter(TypeFilterTest.getASTBehavior(
             "* *->interfaceMethod*(..)")); 

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/TypeFilterTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/TypeFilterTest.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/TypeFilterTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -26,7 +26,11 @@
 
 import junit.framework.TestCase;
 
+import org.jboss.aop.Advisor;
 import org.jboss.aop.Aspect;
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.Domain;
+import org.jboss.aop.GeneratedAdvisorDomain;
 import org.jboss.aop.Mixin;
 import org.jboss.aop.pointcut.Typedef;
 import org.jboss.aop.pointcut.TypedefExpression;
@@ -129,6 +133,22 @@
       assertFilter(new TypedefFilter(typeDef), false, false, false, false, false);
    }
    
+   public void testDomain() throws Exception
+   {
+      AdvisableClassNode classNode = new StandardClassNode(Pojo1.class);
+      Domain domain = new GeneratedAdvisorDomain(AspectManager.instance(),
+            "tag1", Pojo1.class);
+      Advisor advisor = new AdvisorMock("Pojo1Advisor", Pojo1.class, domain);
+      DomainData domainData = new DomainData(advisor);
+      classNode.setAdvisedData(domainData);
+      
+      DomainFilter domainFilter = new DomainFilter("tag1");
+      assertTrue(domainFilter.accept(classNode));
+      
+      domainFilter = new DomainFilter("tag2");
+      assertFalse(domainFilter.accept(classNode));
+   }
+   
    public void testDisjunctive1() throws Exception
    {
       ASTBehavior astBehavior = getASTBehavior("private void *->privateMethod(..)");

Modified: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/TypedefParserTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/TypedefParserTest.java	2008-07-18 01:59:38 UTC (rev 75985)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/TypedefParserTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -37,132 +37,132 @@
    public void testTypedefParser1() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "class(*)");
-      assertEquals("*", TypedefParser.parse(typedef));
+      assertEquals("*", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser2() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "class(org.jboss.aop.Pojo)");
-      assertEquals("org.jboss.aop.Pojo", TypedefParser.parse(typedef));
+      assertEquals("org.jboss.aop.Pojo", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser3() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "has(* *->*(..))");
-      assertEquals("*", TypedefParser.parse(typedef));
+      assertEquals("*", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser4() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "method(* *->*(..))");
-      assertEquals("*", TypedefParser.parse(typedef));
+      assertEquals("*", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser5() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "constructor(*->new(..))");
-      assertEquals("*", TypedefParser.parse(typedef));
+      assertEquals("*", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser6() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "field(* *->*)");
-      assertEquals("*", TypedefParser.parse(typedef));
+      assertEquals("*", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser7() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "hasfield(* *->*)");
-      assertEquals("*", TypedefParser.parse(typedef));
+      assertEquals("*", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser8() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "class(Pojo) OR hasfield(* *->*)");
-      assertEquals("*", TypedefParser.parse(typedef));
+      assertEquals("*", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser9() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "class(Pojo) AND hasfield(* *->*)");
-      assertEquals("Pojo", TypedefParser.parse(typedef));
+      assertEquals("Pojo", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser10() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "class(Pojo) AND hasfield(* *->*)");
-      assertEquals("Pojo", TypedefParser.parse(typedef));
+      assertEquals("Pojo", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser11() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "class(Pojo) AND hasfield(* *->*) AND class(Pojo2)");
-      assertEquals("Pojo2", TypedefParser.parse(typedef));
+      assertEquals("Pojo2", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser12() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "class(org.jboss.aop..) AND hasfield(* *->*) AND class(Pojo2)");
-      assertEquals("Pojo2", TypedefParser.parse(typedef));
+      assertEquals("Pojo2", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser13() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "class(org.jboss.aop..)");
-      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef));
+      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser14() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "class(org.jboss.aop..) OR class(*a*)");
-      assertEquals("*", TypedefParser.parse(typedef));
+      assertEquals("*", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser15() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "class(org.jboss.aop..) AND class(*a*)");
-      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef));
+      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser16() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef", "class(org.jboss.aop..) AND class(a*)");
-      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef));
+      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser17() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef",
             "class(org.jboss.aop..) AND class(a*) AND class($instanceof{MyInterface})");
-      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef));
+      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser18() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef",
             "class(org.jboss.aop..) AND class(a*) AND class(MyClass)");
-      assertEquals("MyClass", TypedefParser.parse(typedef));
+      assertEquals("MyClass", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser19() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef",
             "class(org.jboss.aop..) AND (class(a*) AND class(MyClass))");
-      assertEquals("MyClass", TypedefParser.parse(typedef));
+      assertEquals("MyClass", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser20() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef",
             "class(org.jboss.aop..) AND (class(a*) OR class(MyClass))");
-      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef));
+      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testTypedefParser21() throws Exception
    {
       Typedef typedef = new TypedefExpression("typedef",
             "class(org.jboss.aop..) AND (class(a*) OR class(MyClass)) AND class(*a*)");
-      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef));
+      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testCompositeTypedefParser1() throws Exception
@@ -171,7 +171,7 @@
             "class(org.jboss.aop..) AND (class(a*) OR class(MyClass)) AND class(*a*)");
       AspectManager.instance().addTypedef(typedef);
       typedef = new TypedefExpression("typedef", "class($typedef{typedef1})");
-      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef));
+      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testCompositeTypedefParser2() throws Exception
@@ -183,7 +183,7 @@
       AspectManager.instance().addTypedef(typedef);
       typedef = new TypedefExpression("typedef",
             "has(void *->method(..)) AND class($typedef{typedef2})");
-      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef));
+      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testCompositeTypedefParser3() throws Exception
@@ -195,7 +195,7 @@
       AspectManager.instance().addTypedef(typedef);
       typedef = new TypedefExpression("typedef",
             "has(void *->method(..)) AND class($typedef{typedef2})");
-      assertEquals("Pojo1", TypedefParser.parse(typedef));
+      assertEquals("Pojo1", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testCompositeTypedefParser4() throws Exception
@@ -217,7 +217,7 @@
       AspectManager.instance().addTypedef(typedef);
       typedef = new TypedefExpression("typedef",
              "class($typedef{typedef5}) AND class($typedef{typedef6}) AND class($typedef{typedef7})");
-      assertEquals("Pojo1", TypedefParser.parse(typedef));
+      assertEquals("Pojo1", TypedefParser.parse(typedef, AspectManager.instance()));
    }
    
    public void testCompositeTypedefParser5() throws Exception
@@ -239,6 +239,6 @@
       AspectManager.instance().addTypedef(typedef);
       typedef = new TypedefExpression("typedef",
              "class($typedef{typedef5}) OR class($typedef{typedef6}) AND class($typedef{typedef7})");
-      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef));
+      assertEquals("org.jboss.aop..", TypedefParser.parse(typedef, AspectManager.instance()));
    }
 }
\ No newline at end of file

Added: projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/UnitaryJoinPointGraphTest.java
===================================================================
--- projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/UnitaryJoinPointGraphTest.java	                        (rev 0)
+++ projects/aop/branches/joinpoint_graph/aop/src/test/org/jboss/aop/joinpoint/graph/UnitaryJoinPointGraphTest.java	2008-07-18 02:19:58 UTC (rev 75986)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.aop.joinpoint.graph;
+
+import org.jboss.aop.Domain;
+import org.jboss.aop.pointcut.Pointcut;
+import org.jboss.aop.pointcut.PointcutExpression;
+
+/**
+ * Tests {@code UnitaryJoinPointGraph}.
+ * 
+ * @author  <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ */
+public class UnitaryJoinPointGraphTest extends FullScenarioBuilder
+{
+   public void test1() throws Exception
+   {
+      JoinPointGraph graph = JoinPointGraphFactory.create((Domain)
+            annPojoMethod1Exec1.getAdvisor().getManager());
+      Pointcut pointcut = new PointcutExpression("all methods",
+            "execution(* *->*(..))");
+      Util.assertCollection(graph.search(pointcut), annPojoMethod1Exec1,
+            annPojoMethod2Exec1, annPojoMethod3Exec1, annPojoMethod4Exec1,
+            annPojoMethod5Exec1);
+   }
+   
+   public void test2() throws Exception
+   {
+      JoinPointGraph graph = JoinPointGraphFactory.create((Domain)
+            annPojoMethod1Exec3.getAdvisor().getManager());
+      Pointcut pointcut = new PointcutExpression("all methods",
+            "execution(* $instanceof{" + Object.class.getName() + "}->*(..))");
+      Util.assertCollection(graph.search(pointcut), annPojoMethod1Exec3,
+            annPojoMethod3Exec3, annPojoMethod5Exec3, annPojoMethod6Exec3,
+            annPojoMethod7Exec3);
+   }
+}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list