blob: b024974c4878f4d97222440114de077700128147 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
aspect A {
pointcut tracedPrint(String s): call(void java.io.PrintStream.println(*)) &&
args(s) && !within(A);
before(String s): tracedPrint(s) {
System.out.println("got you: " + s + " ;)");
}
after(String s): tracedPrint(s) {
System.out.println("hehe, finished: " + s + " :(");
}
}
class Main {
public static void main(String[] args) {
System.out.println("start");
}
public void method(String[] s) {
System.out.println("end");
}
}
|