aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2005-02-17 15:12:07 +0000
committeraclement <aclement>2005-02-17 15:12:07 +0000
commit6f1d4d92f9eb00f9c43d1685f231e5580e968922 (patch)
treee959b5df432b3719186fa1e6b03b9073fc210f1f
parent59bee73c83aa70c35f3ec1af1c25332000aa9525 (diff)
downloadaspectj-6f1d4d92f9eb00f9c43d1685f231e5580e968922.tar.gz
aspectj-6f1d4d92f9eb00f9c43d1685f231e5580e968922.zip
Flag indicating if this advice actually matched anything at all.
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java7
1 files changed, 7 insertions, 0 deletions
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;
+ }
}