aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs153/pr149096/SimpleTracing.aj
diff options
context:
space:
mode:
authoraclement <aclement>2006-07-04 16:53:37 +0000
committeraclement <aclement>2006-07-04 16:53:37 +0000
commit4a8b8532694b79c106efd1eb70070e71174b6f1a (patch)
treea5d6e894e69bb05a76f3c4f5e14a37adc61aa2be /tests/bugs153/pr149096/SimpleTracing.aj
parent6becfea965f575ea82af8581d8551b4ed5537ed8 (diff)
downloadaspectj-4a8b8532694b79c106efd1eb70070e71174b6f1a.tar.gz
aspectj-4a8b8532694b79c106efd1eb70070e71174b6f1a.zip
testcode for 149305, 149096, 149305
Diffstat (limited to 'tests/bugs153/pr149096/SimpleTracing.aj')
-rw-r--r--tests/bugs153/pr149096/SimpleTracing.aj32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/bugs153/pr149096/SimpleTracing.aj b/tests/bugs153/pr149096/SimpleTracing.aj
new file mode 100644
index 000000000..a865ed97e
--- /dev/null
+++ b/tests/bugs153/pr149096/SimpleTracing.aj
@@ -0,0 +1,32 @@
+import org.aspectj.lang.JoinPoint;
+
+public abstract aspect SimpleTracing {
+ private Tracer tracer = new Tracer();
+
+ public abstract pointcut scope();
+
+ public pointcut anyExec() :
+ execution(* *(..)) || execution(new(..)) || adviceexecution();
+
+ public pointcut inTracing() : anyExec() && cflow(within(Tracer));
+
+ public pointcut trace() : scope() && anyExec() && !inTracing();
+
+ before() : trace() {
+ tracer.enter(thisJoinPoint);
+ }
+
+ after() : trace() {
+ tracer.exit(thisJoinPoint);
+ }
+
+ class Tracer {
+ public void enter(JoinPoint jp) {
+ System.out.println("trace enter: " + jp.getSignature().toString());
+ }
+
+ public void exit(JoinPoint jp) {
+ System.out.println("trace exit: " + jp.getSignature().toString());
+ }
+ }
+}