I have a library written in kotlin which i want to use in my Java program, but i don't know how to call an asynchronous method correctly.
/*This is my asynchronous kotlin method from the library*/
fun getNames(callback: (List<String>) -> Unit) = ...
/*In Java i want to call this method*/
List<String> names = getNames(...);
What parameter do i have to pass into the function in Java?
IntelliJ says i need something like this: 'kotlin.jvm.functions.Function1<? super java.util.List<String>,kotlin.Unit>'
But i don't know how to instantiate such a class.