Compile-time weaving
AOP tools that employ compile-time weaving perform an additional step to attach aspects after a program is compiled. A program is first compiled as it normally is, resulting in a DLL or EXE. Once the program has been compiled, it is run through a post-compilation process. This process is handled by a post-processor that is provided with an AOP tool.
The post-processor takes the DLL or EXE and adds the aspects to it. Using configuration, the post-processor knows where to apply the advice, such as before a method is executed or when an exception is thrown. The resulting DLL/EXE has both the logic for the core concern and all of the advice:
One of the benefits of compile-time weaving is that there is no overhead during ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access