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

12345678910111213141516171819202122232425262728293031323334
  1. class A {
  2. }
  3. class B extends A {
  4. protected void foo() {}
  5. }
  6. class C extends B {}
  7. class D extends C {
  8. public void foo() {}
  9. }
  10. aspect X {
  11. private void A.foo() {}
  12. void bar() {
  13. D d = new D();
  14. d.foo();
  15. }
  16. declare warning : call(* B.foo()) : "should match";
  17. declare warning : call(* A.foo()) : "should not match";
  18. }