DIBinding

interface DIBinding<C : Any, A, T : Any> : Binding<C, A, T>

Binding that is registered inside a DI object.

It is augmented to allow scoping, contextualizing, debugging, etc.

Parameters

C

The type of the context used by the retriever.

A

The type of argument used to create or retrieve an instance.

T

The type of instance this factory creates or retrieves.

Types

Copier
Link copied to clipboard
common
interface Copier<C : Any, A, T : Any>

An interface capable of copying a binding.

Functions

factoryFullName
Link copied to clipboard
common
open fun factoryFullName(): String

The full(er) name of this factory, used for debug print only.

factoryName
Link copied to clipboard
common
abstract fun factoryName(): String

The name of this factory, used for debug print only.

getFactory
Link copied to clipboard
common
abstract fun getFactory(key: DI.Key<C, A, T>, di: BindingDI<C>): (A) -> T

Returns a factory for the given key. A factory is a function that returns an instance of type T function argument A.

Properties

argType
Link copied to clipboard
common
abstract val argType: TypeToken<in A>

The type of the argument this factory will function for.

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

The type of contexts that are to be set when using this factory.

copier
Link copied to clipboard
common
open val copier: DIBinding.Copier<C, A, T>?

A copier that is responsible for copying / resetting the binding. If null, it means that the binding do not hold any reference or status and need not be copied.

createdType
Link copied to clipboard
common
abstract val createdType: TypeToken<out T>

The type of object that is created by this factory.

description
Link copied to clipboard
common
open val description: String

The description of this factory (using simple type names), used for debug print only.

fullDescription
Link copied to clipboard
common
open val fullDescription: String

The description of this factory (using full type names), used for debug print only.

scope
Link copied to clipboard
common
open val scope: Scope<C>?

The scope used by this factory, if any

supportSubTypes
Link copied to clipboard
common
open val supportSubTypes: Boolean

Whether this bindings supports subtype handling.

Inheritors

NoArgDIBinding
Link copied to clipboard
BaseMultiBinding
Link copied to clipboard
Factory
Link copied to clipboard
Multiton
Link copied to clipboard
SubTypes
Link copied to clipboard