Chapter 3. Examples

Table of Contents

Introduction
Obtaining, Compiling and Running the Examples
Basic Techniques
Join Points and thisJoinPoint
Roles and Views
Development Aspects
Tracing using aspects
Production Aspects
A Bean Aspect
The Subject/Observer Protocol
A Simple Telecom Simulation
Reusable Aspects
Tracing using Aspects, Revisited

Introduction

This chapter consists entirely of examples of AspectJ use.

The examples can be grouped into four categories:

techniqueExamples which illustrate how to use one or more features of the language.
developmentExamples of using AspectJ during the development phase of a project.
productionExamples of using AspectJ to provide functionality in an application.
reusableExamples of reuse of aspects and pointcuts.