Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Intertype declarations and precedence

Everyone,

In "AspectJ in Action", p. 120-122, Laddad discusses aspect precedence and
member introductions, saying that if two aspects introduce the same member,
only the one from the dominating aspect will survive. However, I can't see
how this is right, because as far as I know,

- unless the member is declared private in all places, the program won't
compile, 
- when a member is declared private, it's only visible from inside that
aspect, and
- each aspect will just use its own private declaration.

In the example in the book, SecurityAspect has precedence over
TrackingAspect, but changing the precedence to the opposite has no effect.
SecurityAspect is still just using its own declarations.

So, is Laddad incorrect here, has this changed from the AspectJ version he
used, or am I just not getting the point?

Jon

http://www.eecs.wsu.edu/~jbaekken/




Back to the top