Reflection: add KClass.{supertypes,superclasses,allSupertypes,allSuperclasses}
Some things are not implemented yet for allSupertypes, such as KType->Type mapping of types and generic substitution of built-in types
This commit is contained in:
@@ -16,10 +16,7 @@
|
||||
|
||||
package kotlin.jvm.internal
|
||||
|
||||
import kotlin.reflect.KCallable
|
||||
import kotlin.reflect.KClass
|
||||
import kotlin.reflect.KFunction
|
||||
import kotlin.reflect.KTypeParameter
|
||||
import kotlin.reflect.*
|
||||
|
||||
class ClassReference(override val jClass: Class<*>) : KClass<Any>, ClassBasedDeclarationContainer {
|
||||
override val simpleName: String?
|
||||
@@ -46,6 +43,9 @@ class ClassReference(override val jClass: Class<*>) : KClass<Any>, ClassBasedDec
|
||||
override val typeParameters: List<KTypeParameter>
|
||||
get() = error()
|
||||
|
||||
override val supertypes: List<KType>
|
||||
get() = error()
|
||||
|
||||
private fun error(): Nothing = throw KotlinReflectionNotSupportedError()
|
||||
|
||||
override fun equals(other: Any?) =
|
||||
|
||||
Reference in New Issue
Block a user