org.jetbrains.kotlin.analysis.api¶
Types¶
KaConstantInitializerValue¶
class KaConstantInitializerValue(val constant: KaConstantValue, val initializerPsi: KtExpression?) : KaInitializerValue
An initializer value which can be evaluated to a compile-time constant, such as a string value, number, or null literal.
KaConstantValueForAnnotation¶
class KaConstantValueForAnnotation(val annotationValue: KaAnnotationValue, val initializerPsi: KtExpression?) : KaInitializerValue
An initializer value of a property of an annotation, which cannot be represented as a compile-time constant, but can be represented as a KaAnnotationValue.
KaContextParameterApi¶
@Target(allowedTargets = [AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION])
@RequiresOptIn(message = "An API using the experimental 'context parameters' language feature.")
annotation class KaContextParameterApi
Marks an API that uses context parameters, an experimental language feature. The API is intended for user consumption, but it's based on a non-stable language feature that may change or be removed in the future.
KaExperimentalApi¶
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.TYPEALIAS])
@RequiresOptIn(message = "Experimental API with no compatibility guarantees")
annotation class KaExperimentalApi
Marks an API as experimental. The API is intended for user consumption, but it's not stable and might change at any moment, or even be removed, without a deprecation cycle.
KaIdeApi¶
@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 KaIdeApi
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.
KaImplementationDetail¶
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.TYPEALIAS])
@RequiresOptIn(message = "Internal API which should not be used outside the Analysis API implementation modules as it does not have any compatibility guarantees")
annotation class KaImplementationDetail
Marks an API as an implementation detail of the Analysis API. Such APIs are not intended to be used outside the implementation of the Analysis API and have no compatibility guarantees.
KaInitializerValue¶
sealed class KaInitializerValue
A value of a property or variable initializer.
KaNonConstantInitializerValue¶
class KaNonConstantInitializerValue(val initializerPsi: KtExpression?) : KaInitializerValue
An initializer value which cannot be represented as a compile-time constant.
KaNonPublicApi¶
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.TYPEALIAS])
@RequiresOptIn(message = "Internal API which is used in projects developed by JetBrains")
annotation class KaNonPublicApi
Marks an API as internal to projects developed by JetBrains. Such APIs are not intended for public user consumption and have less strict compatibility guarantees. For example, a change to the API might be implemented without a deprecation cycle.
KaPlatformInterface¶
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.TYPEALIAS])
@RequiresOptIn(message = "An API intended for Analysis API implementations and platforms. The API is neither stable nor intended for user consumption.")
annotation class KaPlatformInterface
Marks an API intended for Analysis API implementations and platforms. The API is neither stable nor intended for user consumption.
KaSession¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaSession : KaLifetimeOwner, KaResolver, KaSymbolRelationProvider, KaDiagnosticProvider, KaScopeProvider, KaCompletionCandidateChecker, KaExpressionTypeProvider, KaTypeProvider, KaTypeInformationProvider, KaSymbolProvider, KaJavaInteroperabilityComponent, KaSymbolInformationProvider, KaTypeRelationChecker, KaExpressionInformationProvider, KaEvaluator, KaReferenceShortener, KaRenderer, KaVisibilityChecker, KaTypeCreator, KaTypeCreatorProvider, KaAnalysisScopeProvider, KaSignatureSubstitutor, KaResolveExtensionInfoProvider, KaCompilerPluginGeneratedDeclarationsProvider, KaCompilerFacility, KaSubstitutorProvider, KaDataFlowProvider, KaSourceProvider, KaKDocProvider
KaSession, also called an analysis session, is the entry point to all frontend-related work. It has the following contracts:
KaSpiExtensionPoint¶
@Target(allowedTargets = [AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY])
@RequiresOptIn(message = "An API designed for implementation only. Direct usage has no compatibility guarantees.")
annotation class KaSpiExtensionPoint
Marks an API as a service provider interface extension point. Such APIs are designed to be implemented, not called directly. There are no compatibility guarantees for usage of these APIs, only for their implementation.