blob: 4b738a975ed5c07037d2cdc39e2991580c445ded (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
public class Initialization extends Super {
public static void main(String[] args) {
new Initialization();
new Initialization(331);
}
Initialization() {
this(98);
}
Initialization(int i) {
super(i+1);
foo(i);
}
static void foo(int i) {
System.out.println("running foo with " + i);
}
}
class Super {
Super(int i) {
}
}
aspect Foo {
// void around(int i): initialization(Initialization.new(int)) && args(i) {
// System.out.println(thisJoinPoint);
// System.out.println(java.util.Arrays.asList(thisJoinPoint.getArgs()));
// proceed(993);
// }
//
Object around(): preinitialization(Initialization.new()) {
System.out.println("i");
return null;
}
// before(int i): execution(Initialization.new(int)) && args(i) {
// System.err.println(i);
// }
}
|