blob: a64f28240f83543c5d250b15fff4e9e9fb183bac (
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.Tester;
public class Proceeding1 {
public static void main(String[] args) {
Tester.checkAllEvents();
}
static aspect A {
interface IProceed {
void proceeds(Runnable next);
}
IProceed decorator = new IProceed() {
public void proceeds(Runnable next) {
Tester.event("IProceed.proceed()");
next.run();
}
};
void around() : execution(void main(String[])) {
Tester.expectEvent("IProceed.proceed()");
decorator.proceeds(new Runnable() {
public void run() {
proceed();
}
});
}
}
}
|