KotlinModuleDependentsProvider¶
KotlinModuleDependentsProvider provides dependents for a KaModule, which are modules that depend on the KaModule.
getDirectDependents and getTransitiveDependents may return an empty set for KaBuiltinsModules and SDK KaLibraryModules even though most modules depend on builtins/SDKs, because it is often not feasible to compute that set. Instead, users of KotlinModuleDependentsProvider should keep this limitation in mind and handle it separately. For example, a global modification event should be published for builtins and SDK changes.
An empty set is also returned for KaDanglingFileModules. Additionally, dangling file modules are never included in the dependents of their context modules. This is because dangling files are created ad-hoc, and it's not economical to keep track of them.
Implementations of this provider should ensure that results are provided in reasonable time, for example by caching results, as its functions may be called frequently.
Inheritors¶
Types¶
Companion¶
object Companion
Functions¶
getDirectDependents¶
abstract fun getDirectDependents(module: KaModule): Set<KaModule>
getRefinementDependents¶
abstract fun getRefinementDependents(module: KaModule): Set<KaModule>
getTransitiveDependents¶
abstract fun getTransitiveDependents(module: KaModule): Set<KaModule>