How does AspectJ check if the execution is happening in the control flow of, say, a method? It could be a very useful insight, to be able to implement the functionality on its own, outside of an AspectJ project.
Your help will be appreciated.
I found out by myself :-)
AspectJ uses a ThreadLocal variable to keep track of the control flow.
Source: AspectJ's own FAQ