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.

CFlowNoAdvice.java 395B

123456789101112131415161718192021
  1. import org.aspectj.testing.Tester;
  2. public class CFlowNoAdvice {
  3. public static void main(String[] args) {
  4. new Foo().bar();
  5. new Foo().bar();
  6. }
  7. }
  8. class Foo {
  9. void bar() {
  10. Tester.check(CFlowAspect.aspectOf() != null, "cflow created");
  11. }
  12. }
  13. aspect CFlowAspect percflow(CFlowAspect.contexts()) {
  14. pointcut contexts(): target(Foo) && call(void bar());
  15. }