Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Defining a pointcut selecting no joinpoints.

On Fri, 13 Feb 2004 12:26, Wes Isberg wrote:
> Sorry, just to be clear: the idiom is to declare a pointcut and
> not define it (not to use a pointcut called "empty"):
>
>     pointcut p();
>
> There was a aspectj-dev thread on ~ undefined concrete pointcuts~
> a while back, and it's in the sample code (and not the docs,
> perhaps because there's not consensus that it's the right thing).
>
> I personally object to it because it's so close to an abstract
> pointcut that someone could easily leave out "abstract" and not
> realize it.  It has the advantage that if this (imho) bug is
> ever fixed, you'll get a compile-time error.

No worries, I followed.
I guess I didn't think of trying to use a pointcut with no definition because 
it didn't seem like something that would work.
Personally I expected to find a primitive, there doesn't seem to be a logical 
reason why an undefined pointcut should be interpreted as selecting no 
joinpoints.

Defining utility pointcuts as Rod Bodkin showed seems like a good way to go... 
perhaps until the issue is decided permanently.

Daniel



Back to the top