If you wanna catch join points that occur within the control flow of another join point you need control-flow based pointcuts. There do only exist two control-flow based pointcuts: cflow(Pointcut) and cflowbelow(Pointcut). The cflow(Pointcut) pointcut will capture all joint points that occur within the specified pointcut, including the join points matching the pointcut itself. Whereas the cflowbelow(Pointcut) pointcut will only capture the join points that occur within the join points matching the specified pointcut.
Example:
cflow(call(* MyClass.myMethod(..))
This pointcut would capture all join points that occur inside any myMethod() method in MyClass that is called, including the call to myMethod() itself.
cflowbelow(call(* MyClass.myMethod(..))
If you’d change cflow to cflowbelow the call to myMethod() would not be captured.
