您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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. }