izumi.distage.model.definition.dsl.AbstractBindingDefDSL
See theAbstractBindingDefDSL companion object Attributes
- Companion:
- object
- Graph
- Supertypes
class Object
trait Matchable
class Any
- Known subtypes
- Self type
Members list
Concise view
Type members
Use this to create utility functions that add bindings mutably to the current module,
as opposed to creating new modules and including them.
Use this to create utility functions that add bindings mutably to the current module,
as opposed to creating new modules and including them.
Example:
import distage.{ClassConstructor, Tag, ModuleDef}
import izumi.distage.model.definition.dsl.ModuleDefDSL
trait RegisteredComponent
class RegisteredComponentImpl extends RegisteredComponent
def addAndRegister[T <: RegisteredComponent: Tag: ClassConstructor](implicit mutateModule: ModuleDefDSL#MutationContext): Unit = {
new mutateModule.dsl {
make[T]
many[RegisteredComponent]
.weak[T]
}
}
new ModuleDef {
addAndRegister[RegisteredComponentImpl]
}
Attributes
- Graph
- Supertypes
class Object
trait Matchable
class Any