asTypeName

Returns a TypeName equivalent to the given Kotlin KType using reflection, maybe using kotlin-reflect if required.


@DelicateKotlinPoetApi(message = "Mirror APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead.")
fun <Error class: unknown class>.asTypeName(): TypeName

Returns a TypeName equivalent to this TypeMirror.


Returns a TypeName equivalent to this KClass.


fun <Error class: unknown class>.asTypeName(): TypeName

Returns a TypeName equivalent to this Type.