add Extend
fun addExtend( di: <ERROR CLASS>, allowOverride: Boolean = false, copy: <ERROR CLASS> = Copy.NonCached): ConfigurableDI
Content copied to clipboard
Adds the bindings of an existing DI instance to the bindings that will be applied when the DI is constructed.
Parameters
di
The existing DI instance whose bindings to be apply when the DI instance is constructed.
allow Override
Whether these bindings are allowed to override existing bindings.
copy
The copy specifications, that defines which bindings will be copied to the new container. All bindings from the extended container will be accessible in the new container, but only the copied bindings are able to access overridden bindings in this new container. By default, all bindings that do not hold references (e.g. not singleton or multiton) are copied.
Throws
When calling this function after getOrConstruct or any DI retrieval function.