Skip to main content

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

I doubt we can correctly support running clients woven with older
aspects.  By hypothesis, the new aspects have some new advice
or inter-type declarations which might need to be woven in.
Further, this might be a language change that, even if it could
be implemented in a compiler/bytecode weaver, might not be
implementable in other contexts.

Conversely, it would be nice to be able to check an id generated in
the aspect against any code woven in target classes, and signal
load-time or run-time errors when they're out of sync.

I'd love to see it work, but don't see how yet.

Wes

Matthew Webster wrote:

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.

_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-dev




Back to the top