Kotlin specification states basic types as "Some types can have a special internal representation - for example, numbers, characters and booleans can be represented as primitive values at runtime". https://kotlinlang.org/docs/basic-types.html
Yet, I am not figuring out any way to know if the Type representation in Kotlin, i.e. instance of KClass
is a basic type, or not?
Scope
We need to parse and convert String
values to strongly typed instances and for "basic types" we want to use the corresponding to<basic type>
auxiliary method, like Java valueOf
or boxing.