typeOf

Common
JVM
JS
Native
1.6
fun <reified T> typeOf(): KType
(source)

Returns a runtime representation of the given reified type T as an instance of KType.

Note that on JVM, the created type has no annotations (KType.annotations returns an empty list) even if the type in the source code is annotated. Support for type annotations might be added in a future version.