De : Andy Clement <andrew.clement@xxxxxxxxx>
À : aspectj-users@xxxxxxxxxxx
Envoyé le : Jeu 1 juillet 2010, 1h 30min 11s
Objet : Re: [aspectj-users] Annotation parameter pointcut
question
possibly (4) ought to work, but I think what you have with 5 is a
clearer way to express things. Raise a bug for (4) if you want me to
look into it in detail.
Andy
On 30 June 2010 14:36, Rizal Anwar <
anrizal05@xxxxxxxx> wrote:
> Hi,
> Let's imagine I have two following annotations :
> public @interface XAnnotation {
> int xid() default 0;
> }
> public @interface YAnnotation {
> int yid() default 0;
> }
> This works fine:
> (1) pointcut myPointcut(): execution( @XAnnotation(xid = 2) * *(..)) ;
> (2) So does this:
> pointcut myPointcut(): execution( @YAnnotation * *(..)) ;
> (3) So does this:
> pointcut myPointcut(): execution( @(XAnnotation || YAnnotation) * *(..)) ;
>
But, I don't manage to make this one:
> (4) pointcut myPointcut(): execution( @(XAnnotation(xid = 2) ||
> YAnnotation(yid=3)) * *(..)) ;
> I use this as workaround though:
> (5) pointcut myPointcut1(): execution( @XAnnotation(xid = 2) * *(..)) ;
> pointcut myPointcut2(): execution( @YAnnotation(yid=3) * *(..)) ;
> pointcut myPointcut3(): myPointcut1() || myPointcut2();
> Is (4) not supported or do I miss something in writing the pointcut ?
> Thanks,
> Anwar.
>
>
>
> _______________________________________________
> aspectj-users mailing list
>
aspectj-users@xxxxxxxxxxx>
https://dev.eclipse.org/mailman/listinfo/aspectj-users>
>
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxxhttps://dev.eclipse.org/mailman/listinfo/aspectj-users