gh-pages / com.nextfaze.devfun.compiler / FLAG_USE_KOTLIN_REFLECTION
FLAG_USE_KOTLIN_REFLECTION
const val FLAG_USE_KOTLIN_REFLECTION: String (source)
Flag to enable Kotlin reflection to get method references. (default: false) (experimental)
Normal java reflection works fine - Kotlin reflection was disable as it was extremely slow (~0.5ms vs. ~1.5s in some cases). (last tested around 1.1)
Also, be aware that when last used, for unknown reasons every second private function reflection call using Kotlinreflection failed with IllegalAccessViolation, even though isAccessible = true was clearly being called.
Set using APT options:
android {
defaultConfig {
javaCompileOptions {
annotationProcessorOptions {
argument("devfun.kotlin.reflection", "true")
}
}
}
}
This feature is largely untested and mostly academic. It also has issues with overloaded functions.