mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-13 15:45:38 +02:00
05dabd1821
proceed used as method name in around advice
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();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
} |