blob: 06b0184abc3c8545489c437d9ccb825e0cb326b3 (
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
|
import org.aspectj.testing.Tester;
public class Driver {
public static void main(String[] args) { test(); }
public static void test() {
C c = new C();
Tester.checkEqual(c.basic(), 4, "basic()");
Tester.checkEqual(c.exceptional(), 3, "exceptional()");
}
}
class C {
public int basic() {
return 1;
}
public int exceptional() {
return 1;
}
}
aspect B {
int around(): target(C) && call(int basic()) {
return 4;
}
int around(): target(C) && call(int exceptional()) {
return 3;
}
}
|