Runtime Weaving vs Binary Weaving
Weaving is the process of linking aspects and objects together.
Proxy objects are
examples of runtime weaving, which can be accomplished
through pure coding
patterns. Binary weaving injects aspects directly into bytecode. Binary weaving
can take place at compile-time with a custom compiler
or at load-time with
a custom class loader. Binary weaving has none of the limitations of interface
or
inheritance proxies, but it usually requires the help of a dedicated library.
AspectJ
AspectJ is a widely used AOP framework with support for compile-time
weaving,
load-time weaving, and post-compile weaving for external classes.
AspectJ is often used in conjunction with the Spring framework, which provides
additional support for aspects as well as runtime weaving.