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
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to