inline fun <reified T> blah(block: T.() -> Unit): Something {
request = T::class.java.newInstance()
that newInstance() is deprecated, usually when you go to the source, it says why it's deprecated and what the alternative is, but this time i'm only seeing:
/** @deprecated */
@CallerSensitive
@Deprecated(
since = "9"
)
public T newInstance() throws InstantiationException, IllegalAccessException {
// ...
}
What is the new non-deprecated way to create an instance of a reified type in Kotlin?
Update: More information as requested:
JDK Version: 11 (not Android, just pure JVM)
Kotlin Version:1.3.61