Annotations - Define a CFlow Stack Definition
Apply a @CFlowStackDef You can reference the CFlowStackDef from within a @Bind annotation, by using the name of the field that was annotated. They can be compositional as well. The following binding in MyAspect uses the defined CFlowStackDefs @Bind (pointcut="execution(void POJO->method4())", cflow="(MyAspect.cf123Before OR MyAspect.cf123Before)") public Object methodAdvice(MethodInvocation invocation) throws Throwable { ... } This says to trigger the SimpleInterceptor on the execution of method4, but only when it is called within the context of method1, method2, and method3 OR contructor and method3. The next example in MyAspect is for recursive methods. The example CFlowStackDef says that two calls to the recursive method must be in the call stack, but no more @CFlowStackDef (cflows={@CFlowDef(expr = "void POJO->recursive(int)", called=true), @CFlowDef(expr = "void POJO->recursive(int)", called=true), @CFlowDef(expr = "void POJO->recursive(int)", called=false)}) public static CFlowStack cf2Recursions; @Bind (pointcut="execution(void POJO->recursive(int))", cflow="MyAspect.cf2Recursions") public Object recursiveAdvice(MethodInvocation invocation) throws Throwable { ... } Combined with the execution binding, the SimpleInterceptor will only be triggered on the second call to the recursive method.