Named

inline class Named(di: DIAware)

Functions

Factory
Link copied to clipboard
common
fun <A, T : Any> Factory(argType: TypeToken<in A>, type: TypeToken<out T>): DIProperty<(A) -> T>
Gets a factory of T for the given argument type and return type.
FactoryOrNull
Link copied to clipboard
common
fun <A, T : Any> FactoryOrNull(argType: TypeToken<in A>, type: TypeToken<out T>): DIProperty<(A) -> T?>
Gets a factory of T for the given argument type and return type, or null if none is found.
Instance
Link copied to clipboard
common
fun <T : Any> Instance(type: TypeToken<out T>): DIProperty<T>
Gets an instance of T for the given type.
fun <A, T : Any> Instance(argType: TypeToken<in A>, type: TypeToken<T>, arg: () -> A): DIProperty<T>
Gets an instance of T for the given type, curried from a factory that takes an argument A.
InstanceOrNull
Link copied to clipboard
common
fun <T : Any> InstanceOrNull(type: TypeToken<out T>): DIProperty<T?>
Gets an instance of T for the given type, or null if none is found.
fun <A, T : Any> InstanceOrNull(argType: TypeToken<in A>, type: TypeToken<out T>, arg: () -> A): DIProperty<T?>
Gets an instance of T for the given type, curried from a factory that takes an argument A, or null if none is found.
Provider
Link copied to clipboard
common
fun <T : Any> Provider(type: TypeToken<out T>): DIProperty<() -> T>
Gets a provider of T for the given type.
fun <A, T : Any> Provider(argType: TypeToken<in A>, type: TypeToken<out T>, arg: () -> A): DIProperty<() -> T>
Gets a provider of T for the given type, curried from a factory that takes an argument A.
ProviderOrNull
Link copied to clipboard
common
fun <T : Any> ProviderOrNull(type: TypeToken<out T>): DIProperty<() -> T?>
Gets a provider of T for the given type, or null if none is found.
fun <A, T : Any> ProviderOrNull(argType: TypeToken<in A>, type: TypeToken<out T>, arg: () -> A): DIProperty<() -> T?>
Gets a provider of T for the given type, curried from a factory that takes an argument A, or null if none is found.

Properties

di
Link copied to clipboard
common
val di: DIAware

Extensions

factory
Link copied to clipboard
common
inline fun <A : Any, T : Any> Named.factory(): DIProperty<(A) -> T>
Gets a factory of T for the given argument type and return type.
factoryOrNull
Link copied to clipboard
common
inline fun <A : Any, T : Any> Named.factoryOrNull(): DIProperty<(A) -> T?>
Gets a factory of T for the given argument type and return type, or nul if none is found.
instance
Link copied to clipboard
common
inline fun <T : Any> Named.instance(): DIProperty<T>
Gets an instance of T for the given type.
inline fun <A : Any, T : Any> Named.instance(arg: A): DIProperty<T>
Gets an instance of T for the given type, curried from a factory that takes an argument A.
inline fun <A, T : Any> Named.instance(arg: Typed<A>): DIProperty<T>
Gets an instance of T for the given type, curried from a factory that takes an argument A.
inline fun <A : Any, T : Any> Named.instance(noinline fArg: () -> A): DIProperty<T>
Gets an instance of T for the given type, curried from a factory that takes an argument A.
instanceOrNull
Link copied to clipboard
common
inline fun <T : Any> Named.instanceOrNull(): DIProperty<T?>
Gets an instance of T for the given type, or null if none is found.
inline fun <A : Any, T : Any> Named.instanceOrNull(arg: A): DIProperty<T?>
Gets an instance of T for the given type, curried from a factory that takes an argument A, or null if none is found.
inline fun <A, T : Any> Named.instanceOrNull(arg: Typed<A>): DIProperty<T?>
Gets an instance of T for the given type, curried from a factory that takes an argument A, or null if none is found.
inline fun <A : Any, T : Any> Named.instanceOrNull(noinline fArg: () -> A): DIProperty<T?>
Gets an instance of T for the given type, curried from a factory that takes an argument A, or null if none is found.
provider
Link copied to clipboard
common
inline fun <T : Any> Named.provider(): DIProperty<() -> T>
Gets a provider of T for the given type.
inline fun <A : Any, T : Any> Named.provider(arg: A): DIProperty<() -> T>
Gets a provider of T for the given type, curried from a factory that takes an argument A.
inline fun <A : Any, T : Any> Named.provider(arg: Typed<A>): DIProperty<() -> T>
Gets a provider of T for the given type, curried from a factory that takes an argument A.
inline fun <A : Any, T : Any> Named.provider(noinline fArg: () -> A): DIProperty<() -> T>
Gets a provider of T for the given type, curried from a factory that takes an argument A.
providerOrNull
Link copied to clipboard
common
inline fun <T : Any> Named.providerOrNull(): DIProperty<() -> T?>
Gets a provider of T for the given type, or null if none is found.
inline fun <A : Any, T : Any> Named.providerOrNull(arg: A): DIProperty<() -> T?>
Gets a provider of T for the given type, curried from a factory that takes an argument A, or null if none is found.
inline fun <A, T : Any> Named.providerOrNull(arg: Typed<A>): DIProperty<() -> T?>
Gets a provider of T for the given type, curried from a factory that takes an argument A, or null if none is found.
inline fun <A : Any, T : Any> Named.providerOrNull(noinline fArg: () -> A): DIProperty<() -> T?>
Gets a provider of T for the given type, curried from a factory that takes an argument A, or null if none is found.