From: aclement Date: Thu, 26 Feb 2004 09:58:14 +0000 (+0000) Subject: Fix for preventing the use of if/target/this/args/cflow/cflowbelow in DeclareSofts. X-Git-Tag: v_preCompileLoopAlteration~20 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b063e77903d9bd8de7bbfc648da9e0b76ac632de;p=aspectj.git Fix for preventing the use of if/target/this/args/cflow/cflowbelow in DeclareSofts. (I hope putting this utility method in the Pointcut class is ok ...) --- diff --git a/weaver/src/org/aspectj/weaver/patterns/Pointcut.java b/weaver/src/org/aspectj/weaver/patterns/Pointcut.java index 6e3cf912f..c7c98b425 100644 --- a/weaver/src/org/aspectj/weaver/patterns/Pointcut.java +++ b/weaver/src/org/aspectj/weaver/patterns/Pointcut.java @@ -19,7 +19,10 @@ import java.io.IOException; import org.aspectj.util.FuzzyBoolean; import org.aspectj.util.TypeSafeEnum; +import org.aspectj.weaver.Advice; +import org.aspectj.weaver.AdviceKind; import org.aspectj.weaver.BCException; +import org.aspectj.weaver.Checker; import org.aspectj.weaver.ISourceContext; import org.aspectj.weaver.IntMap; import org.aspectj.weaver.ResolvedTypeX; @@ -119,6 +122,12 @@ public abstract class Pointcut extends PatternNode { return concretize(inAspect, map); } + public boolean isDeclare(ShadowMunger munger) { + if (munger == null) return false; // ??? Is it actually an error if we get a null munger into this method. + if (munger instanceof Checker) return true; + if (((Advice)munger).getKind().equals(AdviceKind.Softener)) return true; + return false; + } public Pointcut concretize(ResolvedTypeX inAspect, IntMap bindings) {