devbridie
03/23/2019, 4:37 PMAbstractKotlinInspection
is taking place has java.util.EnumMap
(e.g. not js platform)?
2. My replacement pattern is java.util.EnumMap
, but I think it would be more idiomatic to add an import and use EnumMap
directly. I couldn't find any examples of this, which classes should I be looking at?
3. I have a KotlinType
of which I want to create a fragment E::class.java
, but using toString looks nasty here, what would be a better approach?
call.replace(factory.createExpressionByPattern("java.util.EnumMap($0::class.java)", enumClass.toString()))
Thanks!dsavvinov
03/26/2019, 4:03 PMplatform
extension on pretty much everything that can theoretically have a platform. In particular, there’s a KtElement.platform
in Platform.kt
2. Check ImportInsertHelper
3. Does toString
approach work for you at all? I was under impression that KotlinType.toString
produces pretty verbose debug output that is not suited to be pasted into Kotlin sources.