public interface DynamicCFlow { boolean shouldExecute(Invocation invocation); }
Put in the logic you want to run at runtime into the shouldExecution method.
<dynamic-cflow name="simple" class="SimpleDynamicCFlow"/>
Then you can use the dynamic cflow in any cflow expression. The cflow will be allocate once and only once for the entire VM.
public interface XmlLoadable { public void importXml(Element element); }
$ antIt will javac the files and then run the AOPC precompiler to manipulate the bytecode, then finally run the example. The output should read as follows:
run: [java] --- pojo.method4(); --- [java] method1 [java] --- turn on cflow --- [java] <<< Entering SimpleInterceptor for: public void POJO.method1() [java] method1 [java] >>> Leaving SimpleInterceptor