InstanceBinding

class InstanceBinding<T : Any>(createdType: TypeToken<out T>, instance: T) : NoArgDIBinding<Any, T>

Concrete instance provider: will always return the given instance.

Parameters

T

The type of the instance.

createdType

The type of the object, used for debug print only.

Constructors

InstanceBinding
Link copied to clipboard
common
fun <T : Any> InstanceBinding(createdType: TypeToken<out T>, instance: T)
The type of the instance.

Functions

equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
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
open override fun factoryName(): String
The name of this factory, used for debug print only.
getFactory
Link copied to clipboard
common
open override fun getFactory(key: DI.Key<Any, Unit, T>, di: BindingDI<Any>): (Unit) -> T
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
toString
Link copied to clipboard
common
open fun toString(): String

Properties

argType
Link copied to clipboard
common
open override val argType: TypeToken<Unit>
The type of the argument this factory will function for.
contextType
Link copied to clipboard
common
open override val contextType: TypeToken<Any>
The type of contexts that are to be set when using this factory.
copier
Link copied to clipboard
common
open val copier: DIBinding.Copier<Any, Unit, T>?
A copier that is responsible for copying / resetting the binding.
createdType
Link copied to clipboard
common
open override val createdType: TypeToken<out T>
The type of the object, used for debug print only.
description
Link copied to clipboard
common
open override val description: String
The description of this factory (using simple type names), used for debug print only.
fullDescription
Link copied to clipboard
common
open override val fullDescription: String
The description of this factory (using full type names), used for debug print only.
instance
Link copied to clipboard
common
val instance: T
The object that will always be returned.
scope
Link copied to clipboard
common
open val scope: Scope<Any>?
The scope used by this factory, if any
supportSubTypes
Link copied to clipboard
common
open val supportSubTypes: Boolean
Whether this bindings supports subtype handling.