concept compile - time weaving in category dependency injection

This is an excerpt from Manning's book Dependency Injection.
You’ll find tools, frameworks, and architectural styles that enable AOP. In this chapter, we’ll discuss the most ideal form of AOP. The next chapter will discuss dynamic Interception and compile-time weaving as tool-based forms of AOP. These are the three major methods of AOP.1 Table 10.1 lists the methods we’ll discuss, with a few of the major advantages and disadvantages of each.
Compile-time weaving is the opposite of DI, and we consider it to be an anti-pattern. We feel it’s important, however, to include a discussion on compile-time weaving, because it’s a well-known form of AOP, and we want to make it clear that it isn’t a viable alternative to DI.
Figure 11.3 Compile-time weaving process
![]()