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.

1234567891011121314151617181920212223
  1. package a;
  2. public aspect X pertypewithin(p..*) {
  3. int i = 0;
  4. public int getI() { return i; }
  5. public void setI(int i) { this.i = i;}
  6. after() returning: execution(* sayhi(..)) {
  7. System.err.println("after() returning from a method call to sayhi()");
  8. i++;
  9. }
  10. after() returning: execution(* main(..)) {
  11. System.err.println("callcount = "+i);
  12. }
  13. public static void main(String []argv) {
  14. System.err.println("X.main() running");
  15. }
  16. }