Ok. The code compiles though. I think it is legal.

Thanks,
Mohan

On Wed, Sep 24, 2014 at 10:01 AM, Andy Clement <andrew.clem...@gmail.com>
wrote:

> Hi,
>
> Java8 did introduce type annotations but you can't annotate the
> constructor reference you are annotating there (I don't think).
>
> ​There is also no support in AspectJ yet for ​matching on type
> annotations. In your case there you could of course put around advice on
> the call to toCollection().
>
> ​cheers,​
>
> ​Andy​
>
> On 23 September 2014 02:28, Mohan Radhakrishnan <
> radhakrishnan.mo...@gmail.com> wrote:
>
>> Hi,
>>         I have used AspectJ in the past.. I came across this discussion
>> http://mail.openjdk.java.net/pipermail/mlvm-dev/2013-January/005196.html
>>
>> Does AspectJ inject behavior into an annotation like this one ?
>>
>> (e.g) If I have a predicate which is annotated I can intercept the
>> predicate and inject new behaviour.
>>
>> Is there Java code in the compiler that deals with this ? Do you use
>> MethodHandles for this ?
>>
>> I don't know if this is even possible using pure Java but I am interested
>> in looking at any code that does that.
>>
>> List list1 = list.
>>                stream().
>>                 map(p::matcher).
>>                   filter(Matcher::find).map(matcher -> matcher.group()).
>>                       collect(Collectors.toCollection(@ NonNull
>> ArrayList::new));
>>
>> Thanks,
>> Mohan
>>
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@eclipse.org
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@eclipse.org
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to