пт, 9 июл. 2021 г. в 12:19, Mark Thomas <ma...@apache.org>: > > On 09/07/2021 09:58, Konstantin Kolinko wrote: > > Thanks Konstantin. This is good feedback. > > [...] > > > I wonder how Java itself (a java compiler) deals with coercion of > > lambdas to interfaces. Either it generates calls to some helper API, > > or it just repeats the same boilerplate code over and over. > > I'm not sure. I did look to see if there was anything in the public API > around this I could use to help but didn't find anything.
I found some info: https://blogs.oracle.com/javamagazine/behind-the-scenes-how-do-lambda-expressions-really-work-in-java "Behind the scenes: How do lambda expressions really work in Java?" https://docs.oracle.com/javase/8/docs/api/java/lang/invoke/LambdaMetafactory.html >From a quick read, it looks like it does not use reflection API, but a newer invocation API. I am not sure whether it is useful at this point. Just sharing. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org