[aspectc-user] Test joinpoint of earlier match

Andreas.Schulze at metop.de Andreas.Schulze at metop.de
Fri Jan 26 16:53:52 CET 2007


Hi ,

This solution can be seen as a workaround for the problem I have.

Better solution will be if aspect ActionB have not to know which aspects 
were woven before.

So the aspects woven before can be absolute dynamic in design and number.

The only thing I try to reach is, that to every joinpoint only one advice 
code will be woven.

Thanks

Andreas Schulze
Student @ O.-v.-G. University Magdeburg

Olaf Spinczyk <Olaf.Spinczyk at informatik.uni-erlangen.de> schrieb am 
26.01.2007 12:17:37:

> Hi,
> 
> in the the aspect header file of AspectA you could define a named 
> pointcut that
> describes the join-points affected by AspectA:
> 
> pointcut action_a_pct() = execution("% %::run(...)");
> aspect ActionA {
>   advice action_a_pct() : around () { ... }
> };
> 
> In the aspect header file of AspectB you could include AspectA and the 
named
> pointcut definition (#include "AspectA.ah"). The target pointcut for 
ActionB
> excludes the targets of ActionA:
> 
> pointcut action_b_pct() = execution("% %::%(...)") && !action_a_pct();
> aspect ActionB {
>   advice action_b_pct() : around () { ... }
> };
> 
> Did you mean something like this?
> 
> - Olaf
> 
> Andreas.Schulze at metop.de wrote:
> > 
> > Hello aspectc[++]-user group,
> > 
> > In my project I will have two or more aspects weaving code to 
different
> > pointcuts.
> > 
> > The problem is that i need to ensure that at no joinpoint more then 
one
> > aspect will be woven.
> > 
> > 
> > simple example:
> > 
> > aspect ActionA {
> >   advice execution("% %::run(...)")  : around()  {
> >     //advice code
> >     tjp->proceed();
> >     //advice code
> >   }
> > };
> > 
> > aspect ActionB {
> >   advice execution("% %::%(...)")  : around()  {
> >     //other advice code
> >     tjp->proceed();
> >     //other advice code
> >   }
> > };
> > 
> > If ActionA is woven to any run method ActionB schould only weave to 
all
> > functions excluding the run methods.
> > 
> > 
> > Is there a way to realize this functionality?
> > 
> > Thanks
> > 
> > 
> > Andreas Schulze
> > Student @ O.-v.-G. University Magdeburg
> > 
> > 
> > 
------------------------------------------------------------------------
> > 
> > _______________________________________________
> > aspectc-user mailing list
> > aspectc-user at aspectc.org
> > http://www.aspectc.org/mailman/listinfo/aspectc-user
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20070126/f076ed12/attachment.html>


More information about the aspectc-user mailing list