Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Pointcut on annotation attribute with any value?

I'm afraid the use of wildcards in pointcut annotation values for
matching isn't supported right now.  You could raise an enhancement
but I doubt it will be implemented in the near term.  The best you can
do is write some advice to match on @WebService then inside the advice
look at the annotation value and do some pattern matching yourself.
But of course that is a runtime check, not a compile time check - so
possibly not what you want...

Andy

2009/9/7 Kristof Jozsa <kristof.jozsa@xxxxxxxxx>:
> Hi,
>
> is it possible to use the within() pointcut and specify an annotation with
> some specific attribute but using any value?
>
> I'm trying to implement some custom policy enforcement and I have not yet
> found a way to enforce setting eg. a @WebService annotation on classes with
> name, portName and serviceType attributes all set but using any value..
>
> I tried to use this pointcut:
> within (@WebService(name=*) *)
>
> but appearently it matches on the name="*" attribute, not on a name
> attribute set with any value.
>
> What'd be the correct syntax here?
>
> thanks,
> K
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


Back to the top