blob: 91fb6c4b5cb49a11123f733211ed40deb3130c8d (
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
|
import org.aspectj.testing.*;
privileged aspect PrivilegedAspect {
public void OtherClass.foo() {
Tester.event("foo.intro");
}
}
class OtherClass {
}
public class Privileged {
public static void main(String[] args) {
new Privileged().go();
}
static {
Tester.expectEventsInString("foo.intro,foo.done,foo.called");
}
void go() {
Tester.event("foo.called");
new OtherClass().foo();
Tester.event("foo.done");
}
}
|