Chapter

ECOOP 2001 — Object-Oriented Programming

Volume 2072 of the series Lecture Notes in Computer Science pp 327-354

Date:

An Overview of AspectJ

  • Gregor KiczalesAffiliated withDepartment of Computer Science, University of British Columbia
  • , Erik HilsdaleAffiliated withXerox Palo Alto Research Center
  • , Jim HuguninAffiliated withXerox Palo Alto Research Center
  • , Mik KerstenAffiliated withXerox Palo Alto Research Center
  • , Jeffrey PalmAffiliated withXerox Palo Alto Research Center
  • , William G. GriswoldAffiliated withDepartment of Computer Science and Engineering, University of California

* Final gross prices may vary according to local VAT.

Get Access

Abstract

AspectJ is a simple and practical aspect-oriented extension to Java.. With just a few new constructs, AspectJ provides support for modular implementation of a range of crosscutting concerns. In AspectJ’s dynamic join point model, join points are well-defined points in the execution of the program; pointcuts are collections of join points; advice are special method-like constructs that can be attached to pointcuts; and aspects are modular units of crosscutting implementation, comprising pointcuts, advice, and ordinary Java member declarations. AspectJ code is compiled into standard Java bytecode. Simple extensions to existing Java development environments make it possible to browse the crosscutting structure of aspects in the same kind of way as one browses the inheritance structure of classes. Several examples show that AspectJ is powerful, and that programs written using it are easy to understand.