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

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