]> source.dussan.org Git - aspectj.git/commitdiff
from branch: dont stick the interface on @AJ thingies.
authoraclement <aclement>
Tue, 19 Apr 2005 12:38:26 +0000 (12:38 +0000)
committeraclement <aclement>
Tue, 19 Apr 2005 12:38:26 +0000 (12:38 +0000)
weaver/src/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java

index 504f030011461e1cd1ce0fe7c439115f93584df2..2a9f732022ca857589e4598dadd955554e4aa896 100644 (file)
@@ -17,6 +17,8 @@ import java.io.DataOutputStream;
 import java.io.IOException;
 
 import org.aspectj.weaver.patterns.Pointcut;
+import org.aspectj.weaver.patterns.FastMatchInfo;
+import org.aspectj.util.FuzzyBoolean;
 
 public class PerObjectInterfaceTypeMunger extends ResolvedTypeMunger {
        private ResolvedMember getMethod;
@@ -60,8 +62,15 @@ public class PerObjectInterfaceTypeMunger extends ResolvedTypeMunger {
        }
        
        public boolean matches(ResolvedTypeX matchType, ResolvedTypeX aspectType) {
-               //??? this matches many more types than are needed
-               return !matchType.isInterface();
-       }
+        //FIXME ATAJ waiting Andy patch...
+        // comment from Andy - this is hard to fix...
+        
+        // right now I filter @AJ aspect else it end up with duplicate members
+        return !matchType.isInterface() && !matchType.isAnnotationStyleAspect();
+    }
+
+    private FuzzyBoolean isWithinType(ResolvedTypeX type) {
+        return testPointcut.fastMatch(new FastMatchInfo(type, null));
+    }
 
 }