Hadi Lashkari
05/26/2020, 6:39 AMfilterIsInstance
and traverseFilterIsInstance
but I have a problem
• arrow-meta
cannot handle java.lang.Class
correctly. It generates import kotlin.Class
which doesn't exist! I tried to add .replace("java.lang.Class", "")
in fun String.asKotlin(): String
but it didn't solve the problem! Also in fun TypeName.Classy.asKotlin(): TypeName.Classy
there is a condition for Iterable
but didn't work with Class
!
• Also I tried with kotlin.reflect.KClass<T : Any>
but arrow-meta
cannot handle the T : Any
part!
Any suggestion to solve it?simpleName
from the packageName
and apply asKotlin
method on each of them. They both must be deduced from canonical name and asKotlin
just applies on canonical name(aka qualified name). If there's not any other suggestion, I'll start tonight.