AnnotationUtil for Kotlin?

已回答

Hello!

There is a Util-Class com.intellij.codeinsight.AnnoationUtil which has useful functions like getting annotation parameter values etc. from a PsiAnnotation.

I would like to know if there is an alternative which is designed for Kotlin-Annotations (KtAnnotationEntry) or if I can use this Util class with Kotlin, too.

Thank you in advance!

1

Hi,

I don't know such a util, but Kotlin code analysis should be performed using Analysis API. Unfortunately, the documentation is not available yet. I suggest checking usages of org.jetbrains.kotlin.analysis.api.AnalyzeKt#analyze(KtElement, KaSession.() -> R) function in https://github.com/JetBrains/intellij-community.

0

请先登录再写评论。