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

123456789101112131415161718192021222324252627
  1. class Foo {
  2. public static void main(String[] args) {
  3. (new Foo()).m1();
  4. System.out.println("---");
  5. (new Bar()).m1();
  6. }
  7. public void m1() { }
  8. }
  9. class Bar extends Foo {
  10. public void m1() { super.m1(); }
  11. }
  12. aspect A {
  13. static before(): instanceof(Foo) && executions(public * *(..)) {
  14. System.out.println("executions");
  15. }
  16. static before(): instanceof(Foo) && receptions(public * *(..)) {
  17. System.out.println("receptions");
  18. }
  19. }