blob: 826283d77f644413224caf3314b2f0e3f46663ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import org.aspectj.testing.*;
public class LocalInner {
public static void main(String[] args) {
class Local implements Runnable {
public void run() {}
}
Local local = new Local();
local.run();
Tester.checkAllEvents();
}
}
aspect Aspect {
pointcut local(): callsto(receptions(void run()) && instanceof(Runnable));
static before(): local() { Tester.event("before-run"); }
static after(): local() { Tester.event("after-run"); }
static around() returns void: local() { Tester.event("around-run"); proceed(); }
}
|