Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] Named advice

I have discovered another reason for named advice: backwards compatibility
for binary aspect libraries.

Currently the advice name e.g. "ajc$before$coverage_Coverage$29c" is based
on the position in the source file where the advice is declared.
Unfortunately if a trivial change is made to the aspect e.g. a comment is
added the name changes. This makes binary aspect libraries that use
abstract aspects as an "interface" extremely fragile: any clients must be
rewoven. Although current guidelines suggest keep advice as thin as
possible small changes to the aspect may be necessary. It would also be
nice to able to add pointcuts and advice, perhaps to the end of an aspect,
and maintain backwards compatibility similar to that offered by Java
classes. Was numbering of advice sequentially in the source, starting
perhaps with $1 like anonymous inner classes, not considered?

I suppose what we really need is the equivalent of the serialVersionUID for
object serialization with a name generated based on the definition of the
pointcuts on which it depends.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/

The IBM Academy is sponsoring a conference on Aspect-Oriented Software
Development, 3rd-4th September, Yorktown, NY.



Back to the top