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.

A.java 363B

123456789101112131415161718192021
  1. import org.aspectj.lang.*;
  2. import org.aspectj.lang.annotation.*;
  3. @Aspect("percflow(within(C))")
  4. public class A {
  5. @Before("execution(* foo(..)) && cflow(execution(* bar(..)) && this(o))")
  6. public void m(Object o) {}
  7. public static void main(String[] argv) {
  8. new C().bar();
  9. }
  10. }
  11. class C {
  12. public void bar() {
  13. foo();
  14. }
  15. public void foo() {}
  16. }