Chapter 2. Introducing AspectJ

 

This chapter covers

  • Writing an AspectJ “Hello, world!” application
  • Becoming familiar with the AspectJ language
  • Weaving mechanisms
  • Integrating with Spring

In chapter 1, we focused on general concepts in AOP. With those behind us, we can now look at one specific AOP implementation: AspectJ. AspectJ is an aspect-oriented extension to the Java programming language. Like any AOP implementation, AspectJ consists of two parts: the language specification, which defines the grammar and semantics of the language; and the language implementation, which includes weavers that take various forms such as a compiler and a linker. A weaver produces byte code that conforms to the Java byte-code specification, allowing any compliant Java virtual machine (VM) to execute those class files. The language implementation also offers support for integrated development environments (IDEs), to simplify building and debugging applications.

2.1. Writing your first AspectJ program

2.2. AspectJ crosscutting construct

2.3. AspectJ alternative syntax

2.4. Weaving mechanisms

2.5. AspectJ weaving: under the hood

2.6. Spring AspectJ integration

2.7. AspectJ logistics overview

2.8. Summary

sitemap