[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-users] Bizarre behavior with args pointcut
- From: Antti Karanta <Antti.Karanta@xxxxxxxxxxxxxx>
- Date: Fri, 2 Apr 2004 09:40:42 +0300
- Delivered-to: firstname.lastname@example.org
- Organization: FCS Partners Oyj
- User-agent: KMail/1.4.3
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>
FCS Partners Oyj