poohbar
04/20/2021, 8:20 PMDominaezzz
04/20/2021, 8:25 PMRoukanken
04/20/2021, 8:28 PMClass<T>
parameter
if not, it might have that overload anywayspoohbar
04/20/2021, 8:28 PMpoohbar
04/20/2021, 8:28 PMephemient
04/20/2021, 9:14 PMinline fun
(which is the only way <reified T>
is allowed) is not callable on JVM. it is compiled to a chunk of bytecode which stored in the @kotlin.Metadata
of the containing class. when a Kotlin caller calls it, the Kotlin compiler copy-pastes that bytecode at the callsite. there is no way to do that in Java, so you'd have to replicate the function in Java instead.ephemient
04/20/2021, 9:16 PMinline fun <reified T>
function does is call T::class.java
then pass it on to another (non-inline) function, then it is easy to replicate the function in Javaephemient
04/20/2021, 9:16 PM