<br><font size=2 face="sans-serif">Hi ,</font>
<br>
<br><font size=2 face="sans-serif">This solution can be seen as a workaround
for the problem I have.</font>
<br>
<br><font size=2 face="sans-serif">Better solution will be if aspect ActionB
have not to know which aspects were woven before.</font>
<br>
<br><font size=2 face="sans-serif">So the aspects woven before can be absolute
dynamic in design and number.</font>
<br>
<br><font size=2 face="sans-serif">The only thing I try to reach is, that
to every joinpoint only one advice code will be woven.</font>
<br>
<br><font size=2 face="sans-serif">Thanks</font>
<br>
<br><font size=2><tt>Andreas Schulze<br>
Student @ O.-v.-G. University Magdeburg</tt></font>
<br>
<br><font size=2><tt>Olaf Spinczyk <Olaf.Spinczyk@informatik.uni-erlangen.de>
schrieb am 26.01.2007 12:17:37:<br>
<br>
> Hi,<br>
> <br>
> in the the aspect header file of AspectA you could define a named
<br>
> pointcut that<br>
> describes the join-points affected by AspectA:<br>
> <br>
> pointcut action_a_pct() = execution("% %::run(...)");<br>
> aspect ActionA {<br>
>   advice action_a_pct() : around () { ... }<br>
> };<br>
> <br>
> In the aspect header file of AspectB you could include AspectA and
the named<br>
> pointcut definition (#include "AspectA.ah"). The target
pointcut for ActionB<br>
> excludes the targets of ActionA:<br>
> <br>
> pointcut action_b_pct() = execution("% %::%(...)") &&
!action_a_pct();<br>
> aspect ActionB {<br>
>   advice action_b_pct() : around () { ... }<br>
> };<br>
> <br>
> Did you mean something like this?<br>
> <br>
> - Olaf<br>
> <br>
> Andreas.Schulze@metop.de wrote:<br>
> > <br>
> > Hello aspectc[++]-user group,<br>
> > <br>
> > In my project I will have two or more aspects weaving code to
different<br>
> > pointcuts.<br>
> > <br>
> > The problem is that i need to ensure that at no joinpoint more
then one<br>
> > aspect will be woven.<br>
> > <br>
> > <br>
> > simple example:<br>
> > <br>
> > aspect ActionA {<br>
> >   advice execution("% %::run(...)")  : around()
 {<br>
> >     //advice code<br>
> >     tjp->proceed();<br>
> >     //advice code<br>
> >   }<br>
> > };<br>
> > <br>
> > aspect ActionB {<br>
> >   advice execution("% %::%(...)")  : around()
 {<br>
> >     //other advice code<br>
> >     tjp->proceed();<br>
> >     //other advice code<br>
> >   }<br>
> > };<br>
> > <br>
> > If ActionA is woven to any run method ActionB schould only weave
to all<br>
> > functions excluding the run methods.<br>
> > <br>
> > <br>
> > Is there a way to realize this functionality?<br>
> > <br>
> > Thanks<br>
> > <br>
> > <br>
> > Andreas Schulze<br>
> > Student @ O.-v.-G. University Magdeburg<br>
> > <br>
> > <br>
> > ------------------------------------------------------------------------<br>
> > <br>
> > _______________________________________________<br>
> > aspectc-user mailing list<br>
> > aspectc-user@aspectc.org<br>
> > http://www.aspectc.org/mailman/listinfo/aspectc-user<br>
> <br>
</tt></font>