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.

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