BindBuilder

interface BindBuilder<C : Any>

Base builder DSL interface that allows to define scoped and context bindings.

Parameters

C

The context type.

Types

WithScope
Link copied to clipboard
interface WithScope<C : Any> : DI.BindBuilder<C>

Used to define bindings with a scope.

Properties

contextType
Link copied to clipboard
abstract val contextType: TypeToken<C>

The context type that will be used by all bindings that are defined in this DSL context.

explicitContext
Link copied to clipboard
abstract val explicitContext: Boolean

Inheritors

WithScope
Link copied to clipboard
Builder
Link copied to clipboard

Extensions

factory
Link copied to clipboard
inline fun <C : Any, A : Any, T : Any> DI.BindBuilder<C>.factory(noinline creator: BindingDI<C>.(A) -> T): Factory<C, A, T>

Creates a factory: each time an instance is needed, the function creator function will be called.

provider
Link copied to clipboard
inline fun <C : Any, T : Any> DI.BindBuilder<C>.provider(noinline creator: NoArgBindingDI<C>.() -> T): Provider<C, T>

Creates a factory: each time an instance is needed, the function creator function will be called.