Skip to content

KtIdeApi

@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.TYPEALIAS])
@RequiresOptIn(message = "Internal API which is used only from the IntelliJ Kotlin plugin. Such an API should not be used in other places since it has no compatibility guarantees")
annotation class KtIdeApi

Marks an API as designed for and internal to the Kotlin IntelliJ plugin. The API is not intended for public user consumption and does not have any compatibility guarantees.

The motivation behind KtIdeApi is the following: in a few cases, implementing functionality in the Kotlin PSI API is more efficient or more straightforward than implementing it in the Kotlin IntelliJ plugin. The resulting API is normally too specific to be considered a general, public part of the PSI API.