import

abstract fun import(module: DI.Module, allowOverride: Boolean = false)

Imports all bindings defined in the given DI.Module into this builder's definition.

Note that modules are definitions, they will re-declare their bindings in each di instance you use.

Parameters

module

The module object to import.

allowOverride

Whether this module is allowed to override existing bindings. If it is not, overrides (even explicit) will throw an OverridingException.

Throws

If this module overrides an existing binding and is not allowed to OR allowOverride is true while YOU don't have the permission to override.