jlleitschuh
07/05/2018, 8:52 PMTypeUtils::parameterize
method?
https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/reflect/TypeUtils.html#parameterize-java.lang.Class-java.util.Map-
I'm trying to implement a method like this:
internal fun <T, R> KProperty1<T, R>.returnTypeInfo(reifiedType: Type?): TypeInfo =
TypeInfo(returnType.classifier as KClass<*>, returnType.parameterize(reifiedType)!!)
class TypeInfo(val type: KClass<*>, val reifiedType: Type)
This TypeInfo
comes from the Ktor library,
https://github.com/ktorio/ktor/blob/master/ktor-client/ktor-client-core/src/io/ktor/client/call/TypeInfo.kt
Maybe I'm better off asking this question in #C0A974TJ9