mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-26 05:57:44 +02:00
26 lines
728 B
Plaintext
26 lines
728 B
Plaintext
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();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
} |