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.

InterPerCall.java 342B

123456789101112131415161718192021
  1. public class InterPerCall {
  2. public static void main(String[] args) {
  3. new D().m();
  4. }
  5. }
  6. class C {
  7. }
  8. class D extends C {
  9. public void m() { }
  10. }
  11. aspect A perthis(p1()) {
  12. pointcut p1(): execution(void D.m());
  13. pointcut p2(): execution(void C.m());
  14. before(): p2() {
  15. System.out.println("hello");
  16. }
  17. }