org.jetbrains.kotlin.analysis.api.projectStructure¶
Types¶
KaBuiltinsModule¶
@SubclassOptInRequired(markerClass = [KaPlatformInterface::class])
interface KaBuiltinsModule : KaModule
A module which contains Kotlin builtins for a specific platform.
KaDanglingFileModule¶
@SubclassOptInRequired(markerClass = [KaPlatformInterface::class])
interface KaDanglingFileModule : KaModule
A module for a dangling file. Such files are usually temporary and are stored in-memory.
KaDanglingFileResolutionMode¶
enum class KaDanglingFileResolutionMode : Enum<KaDanglingFileResolutionMode>
Specifies how references to non-local declarations in dangling files should be resolved.
KaDanglingFileResolutionModeProvider¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaDanglingFileResolutionModeProvider
A service that provides KaDanglingFileResolutionMode for a given KtFile based purely on its content.
KaJvmTarget¶
class KaJvmTarget
Represents a JVM bytecode target version for compilation.
KaLibraryFallbackDependenciesModule¶
@SubclassOptInRequired(markerClass = [KaPlatformInterface::class])
interface KaLibraryFallbackDependenciesModule : KaModule
A module which stands in for the unknown dependencies of a KaLibraryModule and KaLibrarySourceModule.
KaLibraryModule¶
@SubclassOptInRequired(markerClass = [KaPlatformInterface::class])
interface KaLibraryModule : KaModule
A module which represents a binary library, such as a JAR or KLIB.
KaLibrarySourceModule¶
@SubclassOptInRequired(markerClass = [KaPlatformInterface::class])
interface KaLibrarySourceModule : KaModule
A module which represents the sources for a KaLibraryModule.
KaModule¶
@SubclassOptInRequired(markerClass = [KaPlatformInterface::class])
interface KaModule
KaModule is the Analysis API's view on a module inside a project. A KaModule represents a source set (with production and test sources being separate modules), script, library, and various niche concepts such as dangling files.
KaModuleProvider¶
@SubclassOptInRequired(markerClass = [KaImplementationDetail::class])
interface KaModuleProvider
KaNotUnderContentRootModule¶
@SubclassOptInRequired(markerClass = [KaPlatformInterface::class])
interface KaNotUnderContentRootModule : KaModule
A module which represents a source file living outside the project's content root. For example, test data files, or the source files of another project.
KaScriptDependencyModule¶
@SubclassOptInRequired(markerClass = [KaPlatformInterface::class])
interface KaScriptDependencyModule : KaModule
A module for Kotlin script dependencies. Must either be a KaLibraryModule or KaLibrarySourceModule.
KaScriptModule¶
@SubclassOptInRequired(markerClass = [KaPlatformInterface::class])
interface KaScriptModule : KaModule
A module for a Kotlin script file.
KaSourceModule¶
@SubclassOptInRequired(markerClass = [KaPlatformInterface::class])
interface KaSourceModule : KaModule
A KaModule representing a set of source declarations.
Properties¶
contextModule¶
var KtFile.contextModule: KaModule?
A context module against which analysis of this in-memory file should be performed. It can only be specified for an in-memory file.
copyOrigin¶
val PsiFile.copyOrigin: PsiFile?
The original file if the given PsiFile is a file copy, or null otherwise.
danglingFileResolutionMode¶
The resolution mode explicitly set for this dangling file, or null for files that are not dangling or if the mode was not set.
explicitModule¶
var KtFile.explicitModule: KaModule?
A module to be used for analyzing the given file. Currently, only KaDanglingFileModules can be set as explicit modules.
isDangling¶
val KtFile.isDangling: Boolean
Whether the KtFile is a dangling file.
kaModule¶
A KaModule for a given this in the context of the session's useSiteModule.
refinedContextModule¶
A context module against which analysis of this code fragment should be performed.
Functions¶
kaModule¶
Returns a KaModule for a given this in the context of the useSiteModule.
withDanglingFileResolutionMode¶
fun <R> withDanglingFileResolutionMode(
file: KtFile,
mode: KaDanglingFileResolutionMode,
action: () -> R
): R