KClass use is converted into java.* in code.
See tests for a lot of examples of this
Some interesting bits here.
KClass provides a simple name and a qualified name but no good way to convert it to the current internal representation unless we parse the qualified name like bestGuess.
We need to handle things like Array<String?>::class properly.
Might be blocked by https://youtrack.jetbrains.com/issue/KT-17912 and https://youtrack.jetbrains.com/issue/KT-18104
For now let's go with a bestGuess-style approach of using the qualifiedName and simpleName to try and infer the package and any outerclasses. While this may be wrong some of the time, it will be correct most of the time which is better than the current behavior of being semantically wrong all of the time.
Further complicated by the fact that I can write Array<String>::class but I can't get String as the parameter only Array yet I can't write Array::class to create a ParameterizedTypeName. I can write List::class though, but not List<String>::class.
Super weird...