From d4fd9696d97cbe45e18c3f791ce621f3ab313ea1 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 19 Apr 2005 12:38:26 +0000 Subject: [PATCH] from branch: dont stick the interface on @AJ thingies. --- .../weaver/PerObjectInterfaceTypeMunger.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java b/weaver/src/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java index 504f03001..2a9f73202 100644 --- a/weaver/src/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java @@ -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)); + } } -- 2.39.5