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.

PR113447e.java 729B

123456789101112131415161718192021222324252627282930313233343536
  1. public class PR113447e {
  2. public static void main(String[] args) {
  3. PR113447e me = new PR113447e();
  4. me.method1(1);
  5. me.method3(2);
  6. }
  7. public void method1(int i){}
  8. public void method3(int i){}
  9. }
  10. aspect Super {
  11. // second method doesn't exist
  12. pointcut pc1(int i) :
  13. (args(i) && call(void method1(int)))
  14. || (args(i) && call(void method2(int)));
  15. before(int i) : pc1(i) {}
  16. // second method does exist
  17. pointcut pc2(int i) :
  18. (args(i) && call(void method1(int)))
  19. || (args(i) && call(void method3(int)));
  20. before(int i) : pc2(i) {}
  21. // ensure this still works
  22. pointcut pc3(int i) :
  23. args(i) && (call(void method1(int)) || call(void method2(int)));
  24. before(int i) : pc3(i) {}
  25. after(int i) : pc3(i) {}
  26. }