Given the specified sample ``` interface Handler&l...
# reflect
b
Given the specified sample
Copy code
interface Handler<in Input : Any, out Output : Any> : (Input) -> Output

class A : Handler<String, Unit> {
    override fun invoke(p1: String) { ... }
    fun invoke(p1: Int) { ... }
}
what would be the best way to get a
KFunction1
reference to the version of
invoke
that is for the Handler interface? I need to have all of the runtime type information available, so
handler::invoke
alone wouldn’t be enough since it only yields
KFunction1<Nothing, Any>