I’m trying to extend a plugin for files written in Kotlin. The plugin is supposed to modify Kotlin classes. For this purpose I use methods like
I have no problem in getting PsiClass instances, their methods of Kotlin files, but once it comes down to using the above mentioned method, I get the exception
The plugin handles correctly Java classes, but Kotlin ones are always giving this exception when I use the above methods.
Could somebody give me a hint how to deal with Kotlin classes as well?