addImport

fun addImport(module: DI.Module, allowOverride: Boolean = false): ConfigurableDI

Adds a module to the bindings that will be applied when the DI is constructed.

Parameters

module

The module to apply when the DI instance is constructed.

allowOverride

Whether this module is allowed to override existing bindings.

Throws

When calling this function after getOrConstruct or any DI retrieval function.