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.

Trace.java 631B

12345678910111213141516171819202122
  1. public abstract aspect Trace {
  2. public abstract pointcut traced(Object o);
  3. before (Object exc): traced(exc) {
  4. System.out.println("enter: " /*+ thisJoinPoint.getSignature()*/);
  5. }
  6. Object around(): execution(* doit(..)) {
  7. Object exc = "Hi";
  8. System.out.println("start around: " + exc);
  9. Object ret = proceed();
  10. System.out.println("exiting around with: " + ret);
  11. return ret;
  12. }
  13. Object around(Object exc): traced(exc) {
  14. System.out.println("start around(2): " + exc);
  15. Object ret = proceed(exc);
  16. System.out.println("exiting around with(2): " + ret);
  17. return ret;
  18. }
  19. }