mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-13 15:45:38 +02:00
22 lines
395 B
Java
22 lines
395 B
Java
|
import org.aspectj.testing.Tester;
|
||
|
|
||
|
public class CFlowNoAdvice {
|
||
|
public static void main(String[] args) {
|
||
|
new Foo().bar();
|
||
|
new Foo().bar();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class Foo {
|
||
|
void bar() {
|
||
|
Tester.check(CFlowAspect.aspectOf() != null, "cflow created");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
aspect CFlowAspect percflow(CFlowAspect.contexts()) {
|
||
|
pointcut contexts(): target(Foo) && call(void bar());
|
||
|
}
|