KotlinModificationTrackerFactory¶
KotlinModificationTrackerFactory creates modification trackers for sources and libraries.
In K2 mode, the modification trackers created by this factory must be incremented on specific KotlinModificationEvents. In that sense, they can be viewed as a facade for modification events, for the use case when there are many, possibly short-lived objects that need to be notified of a change. In such cases, listener and subscriber management has too much overhead, making modification trackers the preferred solution.
Implementation Notes¶
KotlinModificationTrackerByEventFactoryBase can be inherited from to implement this platform component based on published modification events.
Inheritors¶
Types¶
Companion¶
object Companion
Functions¶
createProjectWideLibraryModificationTracker¶
abstract fun createProjectWideLibraryModificationTracker(): ModificationTracker
Creates a ModificationTracker which is incremented every time a library in the project is changed.
createProjectWideSourceModificationTracker¶
abstract fun createProjectWideSourceModificationTracker(): ModificationTracker
Creates a ModificationTracker which is incremented every time a Kotlin source file is affected by a modification, in any of the project's source modules.
Such a modification can be any out-of-block code or project structure change affecting the analyzed source code. See KotlinModificationEvent for a definition of out-of-block modification.