[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [aspectj-users] pointcut based on method return type annotation
|
- From: Davide <d@xxxxxxx>
- Date: Fri, 21 May 2010 17:01:46 +0200
- 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:sender:reply-to:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=iTulWd1/06QQWZJoaahXrBldu1kdFYokJtk5k0y538c=; b=hbZ6blUU6/s3Fb2k/r6jYiFPRABydkSnZhk3rU5AfBYkmaA9ymMfrjxnO0HkYWYvYq FWFpjkcSdA6y1FNEvFyOfJs5iM/FgKSntdzsj/j4jDvCJ1+RcDbHm1G9MHf5r0CdtPRP k7/+s0+nxO3ikP2jg+IwqJQDKM0kAncnxicuQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=RnP2BjQUpmBXBNMB4JehQJZvibOR+V09Q7u79Ktl4gp9+iKCyMyShWC4cDjj3uqd/c D2hJimyjRioHN0lu3/J6eFou2X65zeUu9RMrEKXxEMa++x2rnZiE7NTC6vcYmd6HVUaw vpCq6J8I9/O9GCUZiBBmnDnjSqLRJanPiTWCc=
Perfect! I works! Many thanks!
2010/5/21 Andy Clement <andrew.clement@xxxxxxxxx>:
> @AfterReturning(pointcut = "execution((@Contract *) *(..))", returning
> = "newval")
>
> parentheses attach the annotation to the return value type pattern.
>
> Andy
>
> On 21 May 2010 01:01, Davide <d@xxxxxxx> wrote:
>> Using:
>>
>> @AfterReturning(pointcut = "execution(@Contract * *(..))", returning = "newval")
>>
>> will match all methods that have annotation Contract.
>>
>> @Contract
>> T method1(...)
>>
>> But I like to match all methods which return type class has an
>> annotation of type Contract
>>
>> @Contract
>> class T
>> {
>> }
>>
>> T method1(...)
>>
>> it is possible this?
>>
>>
>> --
>> Â_| Â_. Â Âo Â_| Â_
>> Â(_| (_| \/ | (_| (/_
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
--
_| _. o _| _
(_| (_| \/ | (_| (/_