© Copyright 1998-2001 XEROX Corporation. All rights reserved.

Recent Changes


1.0rc2

Language

There are no language changes in this release. This is a bug fix release only.

Compiler

One bug in handling inner class names that conflicted with enclosing names was fixed. Many error messages were improved.

AJDE

AJDE for JBuilder

AJDE for Forte

AJBrowser

Emacs Support: aspectj-mode and AJDEE

This release now properly displays annotations for call sites and introductions. Robustness has been improved in several dimensions, including performance at startup. The compile menu now recomputes properly when changing directories.


1.0rc1

Language

Some of the details of the specification for perthis and pertarget have changed. These changes make these language constructs implementable on current JVMs without memory leaks (this wasn't true of the previous version). Most people will probably not notice these changes, but the correct semantics are described in the semantics section of the programming guide.

In a related change, aspects are not allowed to implement either the java.io.Serializable or the java.lang.Cloneable interface. It is unclear what the correct behavior of a system should be when an aspect is serialized or cloned, and rather than make an arbitrary choice right now we've chosen to leave the most room to design them right in a future release.

Compiler

ajc now directly generates .class files without using javac as a back-end. This should result in improved compiler performance, better error messages and better stack-traces and debugging info in those .class files. -preprocess mode is still available for those who want to generate legal Java source code and a new -usejavac mode is available if you have a requirement to continue to use javac as a back-end.

ajc now officially supports source files with the .aj extension. We plan to extend this support to the rest of our tools as time permits.

This release of ajc includes support for the "-source 1.4" option that enables the new 'assert' keyword in jdk1.4. This option only works correctly when compiling against the jdk1.4 libraries. In addition, this release of ajc will run under SUN's jdk1.4beta2. However, we still strongly recommend that most users use the non-beta jdk1.3.

AJDE

AJDE for JBuilder

AJDE for Forte

AJBrowser

Aspectj-mode and AJDEE: AspectJ support in Emacs

This release of AspectJ support for Emacs includes corrections to the documentation and the appearance of annotations and jumps in the editing view. Also, advice are now shown on non-declarations, when appropriate, such as call advice. The internal event model has been revised to reduce computational overhead.


1.0beta1

Language

There is one language change since 1.0alpha1. The static modifier is no longer needed or allowed on pointcut declarations. Name binding for pointcut declarations works like class methods now. Thanks to Robin Green for encouraging us to look at this one last time.

The current implementation of perthis/pertarget has the possibility of memory leaks (thanks to Arno Schmidmeier for pointing this out). The design of this part of the language will almost certainly see some changes in the next release to address issues of implementability on the JVM as well as related issues.

Compiler

The ajc compiler should now catch all errors in source code and you should no longer see errors coming from files in 'ajworkingdir'. Please report any errors in 'ajworkingdir' as bugs.

All reported bugs in 1.0alpha1 have been fixed. Thanks to everyone for your bug reports. Most notably, the 'if' pcd that was added in 1.0alpha1 should work correctly in this release. Thanks to Morgan Deters for a very thorough bug report on this broken feature days after the 1.0alpha1 release.

AJBrowser

AJDE

AJDE for JBuilder

AJDE for Forte

Aspectj-mode and AJDEE: AspectJ support in Emacs

AspectJ Development Environment for Emacs has been split into two pieces, aspectj-mode (an extension of java-mode), and AJDEE (an extension of JDE). Additionally, a switch, -emacssym, has been added to ajc that generates AspectJ declarations information directly, thus beanshell is no longer required for use of these modes.


1.0alpha1

This is the first alpha release of the 1.0 language and tools. There have been many changes in the language, and many improvements to the tools. We wish to thank our users for putting up with the high volatility of AspectJ in the push to 1.0.

Language

There have been many changes to make the 1.0 language both simpler and more powerful. User feedback has driven most of these design changes. Each email we've received either making a suggestion or just asking a question about a confusing part of the language has played a part in shaping this design. We'd like to thank all of our users for their contributions.

While we don't have room to thank all of our users by name, we'd like to specifically mention a few people for their high-quality sustained contributions to the users@aspectj.org mailing list as well as through their feature requests and bug reports. Robin Green (who'll be very happy to see declare error), Stefan Hanenberg (who should appreciate the '+' wildcard in type patterns), and Rich Price (who suggested final pointcuts, more flexible dominates, and many other improvements).

Note that entries into the porting notes for this release are linked from the various language changes.

Pointcuts

Perhaps the least interesting -- but most pervasive -- change is that the names of the single-kinded pointcut designators (the ones that pick out only one kind of join point)

calls executions gets sets handlers initializations staticinitializations

have been changed to be singular rather than plural nouns

call execution get set handler initialization staticinitialization

Although a side benefit is that the names are one character shorter, the real benefit is that their combination with the && and || operators now reads much more naturally. No longer does "and" mean "or" and "or" mean "and".

You'll notice that receptions doesn't appear on the table as being shortened to reception. That's because call and reception join points have been merged, and the receptions pointcut declaration has been eliminated. Now, call join points describe the action of making a call, including both the caller and callee. Eliminating reception join points makes AspectJ much simpler to understand (reception join points were a commonly misunderstood feature) without giving up expressive power.

We have changed the mechanism for accessing state at join points, which has the benefit of making our treatment of signatures cleaner and easier to read. As a part of this, the instanceof pointcut designator has now been split into two different pointcut designators, this and target, corresponding to a join point's currently executing object and target object, respectively.

The new args pointcut adds expressive power to the language by allowing you to capture join points based on the actual type of an argument, rather than the declared type of its formal. So even though the HashSet.removeAll method takes a Collection as an argument, you can write advice that only runs when it is actually passed a HashSet object.

AspectJ's notion of object construction and initialization, a complicated process in Java, has been clarified. This affects some uses of the initializations pointcut and constructor calls pointcut.

The little-used pointcuts hasaspect and withinall have been removed.

The returns keyword is no longer necessary for user-defined pointcuts.

Pointcuts may now be declared static, and only static pointcuts may be declared in classes and referred to with qualified references (such as MyAspect.move()).

Non-abstract pointcuts may now be declared final.

We have finally added an extremely general pointcut, if(BooleanExpression), that picks out join points programatically.

Type patterns

Our treatment of * and .. in type patterns is cleaner.

Type patterns now have the ability to include array types, and there is a new wildcard, +, to pick out all subtypes of a given type. Previously, the subtypes operator was only allowed in introduction, and was spelled differently.

Advice

Around advice is treated much more like a method, with a return value and an optional throws clause.

The advice precedence rules have been changed. Now, for example, a piece of after advice that appears lexically later than another piece of after advice will run later, as well. Previously, the relationship was the other way around, which caused no small amount of confusion.

After returning advice has lost a useless set of parentheses when not using the return value.

The thisStaticJoinPoint reflective object has been renamed, and the thisJoinPoint object hierarchy has been simplified.

Introduction and static crosscutting

On the static side of the language, introduction hasn't changed, but there is now a new keyword, declare, that is used to declare various statically-crosscutting properties. One of these properties is subtyping, so we've gotten rid of the ugly keywords +implements and +extends.

We have provided two new forms, declare error and declare warning, for the often-asked-for property of compile-time error detection based on crosscutting properties.

AspectJ's interaction with checked exceptions is now firmly on the side of static crosscutting, since Java treats such exceptions at compile-time. A new form, declare soft, can be used to "soften" checked exceptions into an unchecked form. This may affect some uses of around advice that previously mucked with the exception checking system.

Aspects

The "of each" modifiers have been renamed. Apart from the spelling, the main interesting difference is the splitting up of of eachobject into two different modifiers, parallel with the split of instanceof into this and target.

The dominates keyword now takes a type pattern, rather than a type. This allows an aspect A, for example, to declare that its advice should dominate the advice of another aspect B as well as its subtypes, with the new + subtypes operator: aspect A dominates B+.

Compiler

The most important change in the compiler is that it supports the new language. In addition, all reported bugs in the last release have been fixed. Thanks for your bug reports.

The compiler also gets a new -encoding flag in this release for handling source files that are not in standard US-ASCII format. Thanks to Nakamura Tadashi for both suggesting this feature and for submitting a nice patch to implement it.

Known Limitations

The previous compiler's limitations regarding join points that occurred in anonymous classes have all been eliminated. Unfortunately, eliminating this restriction has resulted in preprocessed source code that is less readable than in previous releases. More care will be taken in the next release to mitigate this effect.

Many semantic errors are not caught by ajc but fall through to javac. Moreover, some errors regarding the initialization of final fields might never show up when using ajc. This will be fixed shortly.

Documentation

Although we spent much of our time this release cycle updating the documentation to the new language rather than improving its content, we did make some structural improvements. The old Primer has been split into a Programming Guide, covering the language, and a Development Environment Guide, covering the develompent tools. In addition, printable versions of both guides (in PDF) are finally included in the documentation package.

Ajdoc

Ajdoc was rewritten to conform with the language changes and provide support for other AspectJ/Java compilers. Our doclet is used by default creating AspectJ-specific documentation, or Sun's standard doclet can be used by passing the '-standard' flag to Ajdoc to produce regular Javadoc documentation (excluding AspectJ-specifics).

Ant

An Ajdoc task is now available. The Ajc ant task was improved to be completely back-compatible with the Javac task.

AJBrowser

The "AspectJ Browser" is a new standalone source code browsing application. It will let you compile ".lst" files, view the structure for those files and navigate the corresponding source code.

AJDE

AJDE for JBuilder

Installation
Key Improvements
Known Bugs & Limitations

AJDE for Forte

Installation
Key Improvements
Known Bugs & Limitations

AJDE for Emacs

AspectJ-mode now includes a toggle in the AspectJ menu that disables its intrusive functions, enabling easy switching between Java and AspectJ projects. See the README and CHANGES files in the distribution for additional details.

AJDEE is now compatible with JDEE 2.2.7.1, JDEE 2.2.8beta4, and speedbar 0.14alpha. It a toggle in the AspectJ menu that disables its intrusive functions, enabling easy switching between Java and AspectJ projects. See the README and CHANGES files in the distribution for additional details.


Previous Versions

Changefiles for previous versions can be found in doc/oldversions in the documentation distribution.