mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-07 15:06:01 +02:00
22 lines
363 B
Java
22 lines
363 B
Java
![]() |
import org.aspectj.lang.*;
|
||
|
import org.aspectj.lang.annotation.*;
|
||
|
|
||
|
@Aspect("percflow(within(C))")
|
||
|
public class A {
|
||
|
|
||
|
@Before("execution(* foo(..)) && cflow(execution(* bar(..)) && this(o))")
|
||
|
public void m(Object o) {}
|
||
|
|
||
|
public static void main(String[] argv) {
|
||
|
new C().bar();
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
class C {
|
||
|
public void bar() {
|
||
|
foo();
|
||
|
}
|
||
|
public void foo() {}
|
||
|
}
|