mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
12 lines
275 B
Kotlin
Vendored
12 lines
275 B
Kotlin
Vendored
class Impl: JavaInterface {
|
|
override fun foo(r: Runnable?) {
|
|
r?.run()
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
val fooMethods = javaClass<Impl>().getMethods().filter { it.getName() == "foo" }
|
|
if (fooMethods.size() != 1) return fooMethods.toString()
|
|
|
|
return "OK"
|
|
} |