Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Semantics of "privileged"

If I write a privileged aspect, does that mean it can access private fields 
introduced by other aspects as well?

The language reference states

 > Code in priviliged aspects has access to all members, even private ones.

while it also states

 > aspect A {
 >   private Registry otherPackage.*.r;
 > ...
 > This field, however, is only accessible from the code inside of aspect A.

So, is my private field only accessible from the defining aspect and the 
privileged aspects, or only from the defining aspect? Either way, it sounds like 
one or both parts of the documentation need to be revised.

Thanks,
Macneil Shonle


p.s. Note to proofreaders: in the part quoted above "priviliged" is spelled with 
an i, not an e.



Back to the top