org.jetbrains.kotlin.analysis.api.platform.packages¶
Types¶
KotlinCachingPackageProviderFactory¶
abstract class KotlinCachingPackageProviderFactory(project: Project) : KotlinPackageProviderFactory, Disposable
A KotlinPackageProviderFactory which caches KotlinPackageProviders based on their GlobalSearchScopes. The major advantage here is that KotlinPackageProvider usually caches its own results, which can only be beneficial if it's not recreated with every call to createPackageProvider.
KotlinCompositePackageProvider¶
A composite KotlinPackageProvider which combines all packages provided by its child providers. It should be created with KotlinCompositePackageProvider.create.
KotlinEmptyPackageProvider¶
KotlinForwardDeclarationsPackageProviderFactory¶
KotlinForwardDeclarationsPackageProviderFactory creates KotlinPackageProviders for Kotlin/Native forward declarations.
KotlinPackagePartProviderFactory¶
KotlinPackageProvider¶
interface KotlinPackageProvider : KotlinComposableProvider
KotlinPackageProvider provides information about packages that are visible to Kotlin in a certain context. The provider covers not only packages with Kotlin declarations, but also packages with declarations that match a specified TargetPlatform. For example, packages with Java declarations on the JVM platform.
KotlinPackageProviderBase¶
abstract class KotlinPackageProviderBase(project: Project, val searchScope: GlobalSearchScope) : KotlinPackageProvider
KotlinPackageProviderFactory¶
interface KotlinPackageProviderFactory : KotlinPlatformComponent
KotlinPackageProviderFactory creates a scope-based KotlinPackageProvider which covers all non-generated packages found in source files and possibly indices/stubs for libraries.
KotlinPackageProviderMerger¶
KotlinPackageProviderMerger allows merging multiple KotlinPackageProviders into a more efficient package provider.
Functions¶
createForwardDeclarationsPackageProvider¶
fun Project.createForwardDeclarationsPackageProvider(module: KaModule): KotlinPackageProvider?
Creates a package provider for Kotlin/Native forward declaration packages in module, or null if the module cannot contain forward declarations.
createPackagePartProvider¶
fun Project.createPackagePartProvider(scope: GlobalSearchScope): PackagePartProvider
Create a PackagePartProvider for a given scope. PackagePartProvider is responsible for searching sub packages in a library.
createPackageProvider¶
fun Project.createPackageProvider(searchScope: GlobalSearchScope): KotlinPackageProvider
mergePackageProviders¶
fun Project.mergePackageProviders(packageProviders: List<KotlinPackageProvider>): KotlinPackageProvider