extend
abstract fun extend(container: DIContainer, allowOverride: Boolean = false, copy: Set<DI.Key<*, *, *>> = emptySet())
Content copied to clipboard
Imports all bindings defined in the given DIContainer into this builder.
Note that this preserves scopes, meaning that a singleton-bound in the container argument will continue to exist only once. Both containers will share the same instance.
Parameters
container
The container object to import.
allow Override
Whether this module is allowed to override existing bindings. If it is not, overrides (even explicit) will throw an DI.OverridingException.
Throws
If this DI overrides an existing binding and is not allowed to OR allowOverride is true while YOU don't have the permission to override.