diff options
author | aclement <aclement> | 2006-07-04 16:53:37 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-07-04 16:53:37 +0000 |
commit | 4a8b8532694b79c106efd1eb70070e71174b6f1a (patch) | |
tree | a5d6e894e69bb05a76f3c4f5e14a37adc61aa2be /tests/bugs153/pr149096/SimpleTracing.aj | |
parent | 6becfea965f575ea82af8581d8551b4ed5537ed8 (diff) | |
download | aspectj-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.aj | 32 |
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()); + } + } +} |