Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Bizarre behavior with args pointcut

On Wednesday 31 March 2004 15:57, George Harley1 wrote:

> >   Now I would assume that both pieces of before advice in the above
> > aspect match the same join points as the only difference is that the
> > first collects context whereas the latter does not.
>
> I'm afraid that is a bad assumption. Keep in mind that "args" is not just
> for grabbing context, it is a primitive pointcut that can be used to pick
> out join points such as method and constructor executions or exception
> handlers where there is a related argument or arguments. 

  Ok. I was (erroneusly) assuming it (the args() pointcut) is used either to 
collect context or to pick join points, but not both at the same time. This 
is the case with this() and target() pointcuts - if you provide a type name, 
they pick join points and if you provide an id they collect context. Or am I 
wrong here, too?


-- 
Antti Karanta <Antti.Karanta@xxxxxxxxxxxxxx>
Konsultti
FCS Partners Oyj
ph +358407634648
http://www.fcspartners.fi



Back to the top