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.

AspectTrace.aj 663B

12345678910111213141516171819202122232425262728293031
  1. package test;
  2. import test.ChildInt;
  3. import test.Parent;
  4. import test.ParentInt;
  5. public aspect AspectTrace {
  6. public pointcut p1(): execution(* test.Parent+.do*(..));
  7. public pointcut p2(): withincode(* test.Parent+.do*(..)) && this(test.Parent+);
  8. public pointcut p3() : execution(* test.ParentInt.*(..));
  9. public pointcut p4() : execution(* test.ChildInt.*(..));
  10. before() : p1() {
  11. System.out.println("p1" + thisJoinPoint);
  12. }
  13. // before() : p2(){
  14. // System.out.println("p2" + thisJoinPoint);
  15. // }
  16. //
  17. before() : p3() {
  18. System.out.println("p3" + thisJoinPoint);
  19. }
  20. //
  21. // before() : p4() {
  22. // System.out.println("p4" + thisJoinPoint);
  23. // }
  24. }