[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [aspectj-users] Pointcut on annotation attribute with any value?
|
- From: Andy Clement <andrew.clement@xxxxxxxxx>
- Date: Mon, 7 Sep 2009 10:31:47 -0700
- Delivered-to: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=xjBgRklvjNODEjLrQP+jSRJTfFwruD0krb8mXijQrC8=; b=JTqlZTF4UuOVxAwMYfaM/Au8zehhVYyGYrvRuin5MuCysdOoKGKOxdk6yjhPcM8+sk ROOw6TrjHTtYEqGQ+odHu7JTe+qYqhRNlTkmypiHNsZoM+sts6XzDEO4Vll2SVdXB6tn Abic8QveCzsmGGbwY3oZq4BUraN11SuQzl11I=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=YSXBEseZ43jxNFBrr2kd4/ICDtFjFXCKPRSfGlDAoiJHobnvwas3TXTGOE4U1K2/43 rr0hYS6sAACm+7MpolCXcAhtopxoXZfymDOiNeUOH4xBA0WFaKwKEmCWYiqqBzubE2Oz mwKzc+SUI7DVVImwUEM0mKysxcQCQGAefQxdE=
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
>
>