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.

Foo.java 466B

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