mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-14 02:10:40 +02:00
20 lines
614 B
Java
20 lines
614 B
Java
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(); }
|
|
}
|