bind
inline fun <T : Any> DI.Builder.bind(tag: Any? = null, overrides: Boolean? = null, noinline createBinding: () -> DIBinding<*, *, T>)
Attaches a binding to the DI container
Parameters
T
The type of value to bind.
tag
The tag to bind.
overrides
Whether this bind must or must not override an existing binding.
inline fun <T : Any> DI.Builder.bind(tag: Any? = null, overrides: Boolean? = null): DI.Builder.TypeBinder<T>
Starts the binding of a given type with a given tag.
T generics will be erased!
Return
The binder: call DI.Builder.TypeBinder.with
on it to finish the binding syntax and register the binding.
Parameters
T
The type to bind.
tag
The tag to bind.
overrides
Whether this bind must, may or must not override an existing binding.