You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Proceeding1.aj 728B

1234567891011121314151617181920212223242526
  1. import org.aspectj.testing.Tester;
  2. public class Proceeding1 {
  3. public static void main(String[] args) {
  4. Tester.checkAllEvents();
  5. }
  6. static aspect A {
  7. interface IProceed {
  8. void proceeds(Runnable next);
  9. }
  10. IProceed decorator = new IProceed() {
  11. public void proceeds(Runnable next) {
  12. Tester.event("IProceed.proceed()");
  13. next.run();
  14. }
  15. };
  16. void around() : execution(void main(String[])) {
  17. Tester.expectEvent("IProceed.proceed()");
  18. decorator.proceeds(new Runnable() {
  19. public void run() {
  20. proceed();
  21. }
  22. });
  23. }
  24. }
  25. }