Re: [abc-users] precedence rules in AspectJ

From: Prof. Laurie HENDREN <hendren@cs.mcgill.ca>
Date: Tue Feb 21 2006 - 23:19:59 GMT

The short answer is that any matching advice in one class must
be declared as:

[after]* some number of matching afters
[before]* some number of matching before
[after]* some number of maching afters

after advice is woven from first matching after to last

before advice is woven from last matching before to first matching

Laurie

+-----------------------------------------------------------------
| Laurie Hendren --- laurie.hendren@mcgill.ca
| Associate Dean (Academic), Faculty of Science,
| Dawson Hall, McGill University, 853 Sherbrooke St W,
| Montreal QC H3A 2T6 Canada, 514-398-7179, fax 514-398-1774
+----------------------------------------------------------------
| For contact and home page info as Professor, Computer Science:
| http://www.sable.mcgill.ca/~hendren --- hendren@cs.mcgill.ca
| Research: http://www.sable.mcgill.ca http://aspectbench.org
+----------------------------------------------------------------

On Tue, 21 Feb 2006, Klaus Havelund wrote:

> This question concerns advice precedence rules of AspectJ,
> specifically concerning
> precedence rules within a *single* aspect. I do not fully understand
> in what sitations
> the compiler yields inconsistency warnings (several advices apply to
> the same point).
> Can anyone explain these rules, or where I can read about it?
>
> Klaus
>
> An example of such a warning is:
>
> AddNumbersFromFile.java:27: Pieces of advice from aspect DataInputStreamPolicy
> (DataInputStreamPolicy.java, line 4) and aspect DataInputStreamPolicy
> (DataInputStreamPolicy.java, line 31) and aspect DataInputStreamPolicy
> (DataInputStreamPolicy.java, line 67) and aspect DataInputStreamPolicy
> (DataInputStreamPolicy.java, line 4) are in precedence conflict, and all
> apply here
> int count = source.readInt();
>
>
>
>
>
Received on Tue Feb 21 23:20:03 2006

This archive was generated by hypermail 2.1.8 : Tue Feb 21 2006 - 23:30:05 GMT