W3cubDocs

/Kotlin

defaultType

Platform and version requirements: JVM (1.1)
val KClass<*>.defaultType: KType
Deprecated: This function creates a type which rarely makes sense for generic classes. For example, such type can only be used in signatures of members of that class. Use starProjectedType or createType() for clearer semantics.

Returns a type corresponding to the given class with type parameters of that class substituted as the corresponding arguments. For example, for class MyMap<K, V> defaultType would return the type MyMap<K, V>.

© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.reflect.full/default-type.html