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.

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.

Wes

Daniel McAllansmith wrote:
On Fri, 13 Feb 2004 10:49, Wes Isberg wrote:

is there a special pointcut syntax which is defined to select no
joinpoints at all?


try

  pointcut empty();


Heh, should probably have tried that... thanks.

That might be a good thing to get added to the section on pointcuts in the language semantics doc.

Cheers
Daniel

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users




Back to the top