[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] pointcut based on method return type annotation

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  _|  _
 (_| (_| \/ | (_| (/_