Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] declare precedence question

Wim,

 

The precedence order has a different effect before and after a join point: higher precedence advice runs earlier before the join point but later after the join point (it’s the dressing/undressing principle).

 

The section under the heading “Effects of precedence” could certainly make this more clear, although it can be deduced from the language there:

“A piece of before advice  … If it returns normally, however, then the advice of the next precedence… will run”

“Running after […] advice will run the advice of next precedence… Then the body of the advice will run.”

 

p.s. There’s a typo in that section too: while a “join pint” sounds somewhat refreshing, it’s probably not what was intended…

 


From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Wim Deblauwe
Sent: Wednesday, July 26, 2006 11:42 PM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] declare precedence question

 

Hi,

I have a question on declare precedence: Does the order of the aspects in the list give the order in which the aspects are applied?

Looking to http://www.eclipse.org/aspectj/doc/next/progguide/semantics-d.eclare.html#advice-precedence, it states: "This signifies that if any join point has advice from two concrete aspects matched by some pattern in
TypePatternList, then the precedence of the advice will be the order of in the list."

The way I understand this is that an aspect that is first in the list has higher precedence, and thus is executed first, right?

However, looking to http://www.eclipse.org/aspectj/doc/released/progguide/examples-production.html#d0e3260, I see there "...and Billing is declared to be more precedent than Timing to make sure that this advice runs after Timing's advice on the same join point.", which seem to indicate the opposite.

x


Back to the top