Cómo acceder a los attributes / methods en el parámetro de class genérico

Nuevo para Kotlin viniendo de C #.

Estoy intentando crear una class que incluya un object de class intercambiable a través de generics. En la class, me gustaría acceder a valores de attributes y methods de llamada en la class. Supongo que esto tiene que ser a través de algún tipo de mecanismo de reflexión. Excavando references de Kotlin He intentado aplicar sugerencias a mi código, sin embargo, recibo algunos errores crípticos.

Cualquier ayuda es apreciada.

Error:(35, 20) Kotlin: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: @InlineOnly public operator inline fun <T> Lazy<T1?>.getValue(thisRef: Any?, property: KProperty<*>): T1? defined in kotlin @InlineOnly public operator inline fun <V, V1 : T1?> Map<in String, T1?>.getValue(thisRef: Any?, property: KProperty<*>): T1? defined in kotlin.collections @SinceKotlin public fun <K, V> Map<Class<T1>, T1?>.getValue(key: Class<T1>): T1? defined in kotlin.collections @JvmName @InlineOnly public operator inline fun <V> MutableMap<in String, in T1?>.getValue(thisRef: Any?, property: KProperty<*>): T1? defined in kotlin.collections Error:(75, 20) Kotlin: Expression in a class literal has a nullable type 'T1?', use !! to make the type non-nullable Error:(75, 35) Kotlin: Type parameter bound for T in val <T : Any> KClass<T>.memberProperties: Collection<KProperty1<T, *>> is not satisfied: infernetworking type CaptunetworkingTypeConstructor(out T1?) is not a subtype of Any open class Base<T1, T2> (@Autowinetworking var t2: T2) { @Autowinetworking var request: T1? = null inline fun <reified T1: Any> retrieveClass(): T1? { return request.getValue(T1::class.java) } fun endpoint( @ApiParam(value = "Options", requinetworking = true) @Valid @RequestBody body: T1 ): ResponseEntity<MyResponse> { type1 = body val obj = retrieveClass() for (prop in obj::class.memberProperties) { println("${prop.name} = ${prop.get(obj)}") } val usefulResult = obj.usefulMethod() } } 

Después de las modificaciones para acceder a las properties genéricas de la class, el código se ve así, con un error en println:

 Error:(82, 56) Kotlin: Out-projected type 'KProperty1<out T1, Any?>' prohibits the use of 'public abstract fun get(receiver: T): R defined in kotlin.reflect.KProperty1' open class Base<T1 : Any, T2 : Any> (@Autowinetworking var t2: T2) { @Autowinetworking var request: T1? = null fun endpoint( @ApiParam(value = "Options", requinetworking = true) @Valid @RequestBody body: T1 ): ResponseEntity<MyResponse> { val myClass = body.let { it::class } val my2ndClass = t2.let { it::class } for (prop in myClass.memberProperties) { println("${prop.name} = ${prop.get(myClass)}") } val usefulResult = my2ndClass.usefulMethod(myClass) } }