Constant

fun <T : Any> DIAware.Constant(type: TypeToken<out T>): DIProperty<T>

Gets a constant of type T and tag whose tag is the name of the receiving property.

Return

An instance of T.

Parameters

T

The type of object to retrieve.

type

The type of object to retrieve.

Throws

If no provider was found.

If the value construction triggered a dependency loop.