Chapter 8. AspectJ weaving models

This chapter covers

  • Classifying weaving models

  • Using build-time weaving

  • Using load-time weaving

Until now, we've focused on writing aspects. But for aspects to have effect, you need to weave them. Weaving, a fundamentally critical mechanism in implementing AOP, composes classes and aspects into an executable system.

The most basic form of weaving is build-time source-code weaving, where the AspectJ compiler compiles source files to produce a woven system. Although this form offers the best experience by providing immediate feedback for source-code errors and by eliminating deployment modifications, using a new compiler can impede AOP adoption. One alternative is build-time byte-code weaving, which lets you delay the ...

Get AspectJ in Action now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.