jlleitschuh
07/05/2018, 8:53 PMe5l
07/06/2018, 9:12 AMreturnTypeInfo
method? It could be possible with reified parametersjlleitschuh
07/06/2018, 1:51 PMclass GenericSubModel<S>(val value: S)
class ModelWithNestedGeneric<T>(val subModelElement: GenericSubModel<T>)
@Test
fun `generic type extraction`() {
val typeInfo = typeInfo<ModelWithNestedGeneric<String>>()
val property = ModelWithNestedGeneric::class.memberProperties.first()
val typeInfoForProperty = typeInfo<GenericSubModel<String>>()
assertEqualTypeInfo(typeInfoForProperty, property.returnTypeInfo(typeInfo.reifiedType))
}
e5l
07/06/2018, 1:56 PMType
using java reflectionjlleitschuh
07/06/2018, 1:59 PMParameterizedType
.
I'm also not a huge fan of having a dependency upon apache commons.
I'd really love to have this project eventually get integrated into Ktor proper and I don't think that will happen with an external dependency upon apache commons 3.
Still looking for feedback on this proposal:
https://github.com/ktorio/ktor/issues/453