The AspectJtm Development Environment Guide

the AspectJ Team

Copyright (c) 1998-2001 Xerox Corporation, 2002 Palo Alto Research Center, Incorporated, 2003-2005 Contributors. All rights reserved.

Abstract

This guide describes how to build and deploy AspectJ programs using the AspectJ tools and facilities. See also The AspectJ Programming Guide, the documentation available with the AspectJ support available for various integrated development environments (e.g., Eclipse AJDT), and the most-recent documentation available from the AspectJ project page, at http://eclipse.org/aspectj.


Table of Contents

1. Introduction to the AspectJ tools
The Eclipse AspectJ implementation
Bytecode weaving, incremental compilation, and memory usage
Classpath, inpath, and aspectpath
2. AspectJ command-line tools
ajc, the AspectJ compiler/weaver
ajdoc, the AspectJ documentation tool
aj, the AspectJ load-time weaving script
3. AspectJ Browser
Introduction
Building Programs
Build Configurations
Compiling a Program Build Configuration
Navigating Program Structure
Example: Exploring the "Spacewar" sample code
Running Programs
Isolating problems running the AspectJ browser
Known issues with the AspectJ browser
Limitations
AspectJ Browser questions and bugs
4. AspectJ Ant Tasks
Introduction
Installing Ant Tasks
AjcTask (iajc)
AjcTask (iajc) Options
AjcTask matching parameters specified as nested elements
AjcTask Path-like Structures
Sample of iajc task
Avoiding clean compiles
Programmatically handling compiler messages
Ajc11CompilerAdapter (javac)
Sample of compiler adapter
Compiler adapter compilerarg options
Ajc10 (ajc)
Ajc10 (ajc) Options
Ajc10 parameters specified as nested elements
Sample of ajc task
Isolating problems running the Ant tasks
Known issues with the Ant tasks
Ant task questions and bugs
5. Load-Time Weaving
Introduction
Weaving class files more than once
Load-time Weaving Requirements
Configuration
Enabling Load-time Weaving
Configuring Load-time Weaving with aop.xml files
Using Concrete Aspects
Using Concrete Aspects to define precedence
Weaver Options
Special cases
Runtime Requirements for Load-time Weaving
Supported Agents
JVMTI
JRockit with Java 1.3/1.4 (use JVMTI on Java 5)
6. AspectJ version compatibility
Version Compatibility
Java compatibility
Runtime library compatibility
Aspect binary compatibility
Aspect source compatibility
Problems when upgrading to new AspectJ versions