選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

AfterStaticCall.java 482B

12345678910111213141516171819202122
  1. import org.aspectj.testing.Tester;
  2. /** @testcase PR#900 after advice on static call jp */
  3. public class AfterStaticCall {
  4. public static void main(String[] args) {
  5. Tester.expectEvent("foo()");
  6. Tester.expectEvent("after() : call(void Test.foo())");
  7. foo();
  8. Tester.checkAllEvents();
  9. }
  10. public static void foo() {
  11. Tester.event("foo()");
  12. }
  13. }
  14. aspect LogFooCall {
  15. after() : call(static void foo()) {
  16. Tester.event("after() : call(void Test.foo())");
  17. }
  18. }