SetBinding

class SetBinding<C : Any, T : Any>(contextType: TypeToken<in C>, _elementType: TypeToken<out T>, createdType: TypeToken<out Set<T>>) : BaseMultiBinding<C, Unit, T> , NoArgDIBinding<C, Set<T>>

Binding that holds multiple factory bindings (e.g. with argument) in a set.

Parameters

C

The context type of all bindings in the set.

T

The provided type of all bindings in the set.

Constructors

SetBinding
Link copied to clipboard
fun <C : Any, T : Any> SetBinding(contextType: TypeToken<in C>, _elementType: TypeToken<out T>, createdType: TypeToken<out Set<T>>)

Functions

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

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

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

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

getFactory
Link copied to clipboard
open override fun getFactory(key: DI.Key<C, Unit, Set<T>>, di: BindingDI<C>): (Unit) -> Set<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
open override val argType: TypeToken<Unit>

The type of the argument this factory will function for.

contextType
Link copied to clipboard
open override val contextType: TypeToken<in C>

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

copier
Link copied to clipboard
open override val copier: DIBinding.Copier<C, Unit, Set<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
open override val createdType: TypeToken<out Set<T>>

The type of object that is created by this factory.

description
Link copied to clipboard
open val description: String

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

fullDescription
Link copied to clipboard
open val fullDescription: String

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

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

The scope used by this factory, if any

supportSubTypes
Link copied to clipboard
open val supportSubTypes: Boolean

Whether this bindings supports subtype handling.