Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Inject annotation in lambda

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

Back to the top