Find all implementations of the interface, including lambdas

I have a unit test that searches my project and finds all implementations of a specific interface. Then, for each implementation that is an inner class, I maintain that it does not capture the outer class.

I use the Reflections library to do this, and it really worked, but now I need to test a different interface, many of which are lambda implementations. Unfortunately, Reflections cannot find implementations of lambda interfaces.

Can I use another solution that will work with lambdas?

+4
source share
1 answer

- . , , ?

, , - . OpenJDK - :

, , , - , . , , " " , , , , ( , -----.)

. ( ) SO post Java 8 lambdas invokedynamic?

. (.. ) API , API, JRE .

, , - .

+4

Source: https://habr.com/ru/post/1688887/


All Articles