Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Aspect association question

http://www.eclipse.org/aspectj/doc/released/progguide/semantics-aspects.html#d0e6898

nested aspects must be declared static.  This has no 
effect on their instantiation or on the form of
aspectOf(..).  They are effectively top-level.

Wes

On Sat, 26 Nov 2005 15:52:58 -0700
 "Zepeda, Herbey" <hzepeda2@xxxxxxxx> wrote:
> Hi again, 
> 
> I would like to reformulate my previous questions. First
> of all I
> omitted the keyword "static" in the code below so
> regarding the inner
> aspect it should be: "static Aspect inner perthis()". 
> I can infer now that given that static describes an
> element which can
> only exist once, there can not be a perthis association
> since both
> keywords conflict with each other.
> My question is, is there a way to accomplish the goal of
> creating a
> perthis association in a nested aspect?
> 
> Thank you
> 
> Herbey
> 
> 
> 
> >I have two questions:
> 
> 
> >1)Can we have a perobject aspect association when the
> aspect to
> >associate is nested? i.e.:
> 
> >aspect outer perthis(){
> >	Aspect inner perthis(){
> >		String anyString="Something";
> >	}
> 
> >}
> 
> >2)In case the response to 1 is yes, how can I access a
> member from
> >outside both aspects. I am trying the following
> unsuccessfully:
> 
>
>outer.aspectOf(inner.aspectOf(myAccountProvider)).anyString);
> 
> >inner.aspectOf(myAccountProvider)).anyString;
> 
> 
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top