android-beans / rocks.frieler.android.beans / AndroidInfrastructureBeansProvider

AndroidInfrastructureBeansProvider

class AndroidInfrastructureBeansProvider : BeansProvider

A BeansProvider that provides android infrastructure objects usually obtained through the android.content.Context that exist on Application-level.

Provided beans are

Constructors

<init>

AndroidInfrastructureBeansProvider(application: Application)

A BeansProvider that provides android infrastructure objects usually obtained through the android.content.Context that exist on Application-level.

Functions

lookUpBeans

fun <T : Any> lookUpBeans(type: KClass<T>): List<T>

Looks up all beans of the given type in the BeanRegistry of this application.

lookUpOptionalBean

fun <T : Any> lookUpOptionalBean(name: String, type: KClass<T>): T?

Looks up the bean with the given name and type.

fun <T : Any> lookUpOptionalBean(type: KClass<T>): T?

Looks up a bean of the given type.

Inherited Functions

lookUpBean

open fun <T : Any> lookUpBean(name: String, type: KClass<T>): T

Looks up the bean with the given name and type.

open fun <T : Any> lookUpBean(name: String, type: Class<T>): T

Looks up the bean with the given name and Java type.

open fun <T : Any> lookUpBean(type: KClass<T>): T

Looks up a bean of the given type.

open fun <T : Any> lookUpBean(type: Class<T>): T

Looks up a bean of the given Java type.

lookUpBeans

open fun <T : Any> lookUpBeans(type: Class<T>): List<T>

Looks up all beans of the given Java type in the BeanRegistry of this application.

lookUpOptionalBean

open fun <T : Any> lookUpOptionalBean(name: String, type: Class<T>): T?

Looks up the bean with the given name and Java type.

open fun <T : Any> lookUpOptionalBean(type: Class<T>): T?

Looks up a bean of the given Java type.