diff options
author | wisberg <wisberg> | 2002-12-16 18:51:06 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2002-12-16 18:51:06 +0000 |
commit | 144143c2970a1e874d74cdbd0f8c622d4282a3c3 (patch) | |
tree | b12383d3d9e76c7e1f25f7fbec83051ef17f81fb /tests/debugger/TestClass.java | |
parent | fafae443719b26159ab2d7dac1c9b46b5e00b671 (diff) | |
download | aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.tar.gz aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.zip |
initial version
Diffstat (limited to 'tests/debugger/TestClass.java')
-rw-r--r-- | tests/debugger/TestClass.java | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/debugger/TestClass.java b/tests/debugger/TestClass.java new file mode 100644 index 000000000..712244e6c --- /dev/null +++ b/tests/debugger/TestClass.java @@ -0,0 +1,56 @@ +//package debugger; + +public class TestClass { + public static void main(String[] args) { + new TestClass().go(); + } + + void go() { + String s = "s"; + String ss = "ss"; + String sss = "sss"; + a(); + } + + void a() { + int i3 = 3; + b(); + } + + void b() { + int i1 = 1; + int i2 = 2; + c(); + } + + void c() { + String c = "c"; + System.out.println(c); + } + +} + +aspect TestClassAspect of eachobject(instanceof(TestClass)) { + pointcut a(): receptions(* a(..)) && instanceof(TestClass); + pointcut b(): receptions(* b(..)) && instanceof(TestClass); + pointcut c(): receptions(* c(..)) && instanceof(TestClass); + before(): a() { + System.out.println("before a"); + } + before(): b() { + System.out.println("before b"); + } + before(): c() { + System.out.println("before c"); + } + after(): a() { + long l = 123; + System.out.println("after a"); + } + after(): b() { + System.out.println("after b"); + } + after(): c() { + System.out.println("after c"); + } +} |