explicitModule¶
var KtFile.explicitModule: KaModule?
A module to be used for analyzing the given file. Currently, only KaDanglingFileModules can be set as explicit modules.
explicitModule can be useful for constructing dangling file modules consisting of more than one file:
-
Create all in-memory files;
-
Manually initiate a
KaDanglingFileModule, passing all created files. -
Set the newly created module as an
explicitModuleto all of the created files.
Use with extreme care – explicitModule overrides all other configuration. If you only need to provide the context module for an in-memory file, use contextModule instead.
An explicit module can only be specified for an in-memory file.