[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Implementing abstract pointcut that includes no joinpoints
|
Declare nothing:
aspect A extends AA {
protected pointcut defineme(); // matches no join points
protected pointcut andme() : execution(public * *(..));
}
Wes
> ------------Original Message------------
> From: Ken Pelletier <ken@xxxxxxxx>
> To: aspectj-users@xxxxxxxxxxx
> Date: Thu, Oct-20-2005 10:05 PM
> Subject: [aspectj-users] Implementing abstract pointcut that includes no joinpoints
>
> I have an abstract aspect that declares a couple of abstract
> pointcuts to be overridden in concrete subclasses.
>
> In a particular subclass, however I want to nullify one of those
> pointcuts; include no joinpoints at all.
>
> Is there a common idiom for implementing a concrete pointcut that
> explicitly includes no joinpoints?
>
> I know I can nullify with && if(false), but it smells funny to
> declare any advice type at all if really none applies.
>
> Eg:
>
> protected overriddenAbstractPointcut() :
> <what_would_advice_spec_be_here> && if(false;
>
> Regards,
>
> - Ken
>
> PS: it's probably a design smell in the first place to have abstract
> pointcuts that sometimes have no applicable concrete implementation,
> but that's another matter. :-)
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>