blob: d8d22c6514635267e3f4f69114873b45f18182c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import org.aspectj.testing.Tester;
public class ExternalCalls {
public static void main(String[] args){
Tester.checkEqual(new Test().go(), 1003);
Tester.checkEqual(Math.max(1, 3), 3);
}
}
class Test {
int go(){
return Math.max(1, 3);
}
}
aspect A percflow(this(Test) && execution(* go(..))) {
// ! call(* Test.go()) shouldn't do anything
int around(): call(int Math.*(..)) && ! call(* Test.go()) {
return proceed() + 1000;
}
}
|