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.

TraceWithInnerV2.aj 842B

12345678910111213141516171819202122232425262728293031323334
  1. aspect Trace {
  2. public static boolean expectNoSuchMethodError = false;
  3. before(): execution(void doit(..)) {
  4. System.out.println("entering");
  5. }
  6. public void method() {
  7. // Extra method to do nothing but test if the numbering still behaves
  8. }
  9. static aspect InnerTrace {
  10. before(): execution(void doit(..)) {
  11. System.out.println("Inner entering");
  12. }
  13. after() returning: execution(void doit(..)) {
  14. System.out.println("Inner exiting");
  15. }
  16. after() throwing: execution(void doit(..)) {
  17. System.out.println("Inner chucking");
  18. }
  19. before(): execution(* noMatch(..)) {
  20. System.out.println("This doesn't match anything, but checks the sequence number for the next bit of advice is OK");
  21. }
  22. }
  23. after() returning: execution(void doit(..)) {
  24. System.out.println("exiting");
  25. }
  26. }