Nathan Bedell
09/26/2021, 5:27 PMKtClass
? Closest I've been able to get so far is ktClass.parent
, which (assuming the KtClass
sits at top level), I believe gives me a PsiElement
that represents the file that the class sits in. However, even there, I can't see any way to get the package path where the class resides. I'm not seeing anything in the methods of either KtClass
or PsiElement
that would be helpful here. Any ideas?Transform.newSources
-- and in the generated code, I need to be able to add an import statement for KtClass
in question.raulraja
09/26/2021, 7:43 PMdescriptor
property in which you can get the package containedorg.jetbrains.kotlin.psi.KtPureElement.findClassDescriptor(bindingContext: org.jetbrains.kotlin.resolve.BindingContext): org.jetbrains.kotlin.descriptors.ClassDescriptor
Nathan Bedell
10/12/2021, 11:15 PMpackage
declaration -- so of course all of the methods that should have returned a package were coming up empty!