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.

AroundClosureExecutionAdvice.aj 470B

12345678910111213141516171819202122
  1. import java.io.InvalidClassException;
  2. import org.aspectj.testing.Tester;
  3. public aspect AroundClosureExecutionAdvice {
  4. pointcut run () :
  5. execution(public void run());
  6. void around () : run () {
  7. Runnable runnable = new Runnable() {
  8. public void run () {
  9. System.out.println("> AroundClosureExecutionAdvice.run()");
  10. proceed();
  11. System.out.println("< AroundClosureExecutionAdvice.run()");
  12. }
  13. };
  14. runnable.run();
  15. }
  16. }