From 6f1d4d92f9eb00f9c43d1685f231e5580e968922 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 17 Feb 2005 15:12:07 +0000 Subject: Flag indicating if this advice actually matched anything at all. --- weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'weaver') diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java index 344602d97..948fc536a 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java @@ -49,6 +49,8 @@ import org.aspectj.weaver.patterns.Pointcut; public class BcelAdvice extends Advice { private Test pointcutTest; private ExposedState exposedState; + + private boolean hasMatchedAtLeastOnce = false; public BcelAdvice( AjAttribute.AdviceAttribute attribute, @@ -131,6 +133,7 @@ public class BcelAdvice extends Advice { } public void implementOn(Shadow s) { + hasMatchedAtLeastOnce=true; BcelShadow shadow = (BcelShadow) s; if (getKind() == AdviceKind.Before) { shadow.weaveBefore(this); @@ -425,5 +428,9 @@ public class BcelAdvice extends Advice { } return ret; //(BcelVar[]) exposedState.vars; } + + public boolean hasMatchedSomething() { + return hasMatchedAtLeastOnce; + } } -- cgit v1.2.3