android-beans / rocks.frieler.android.beans / Beans / lookUpBean

lookUpBean

inline fun <reified T : Any> lookUpBean(name: String? = null): T

Looks up the bean with the inferred type and given name (if not null) in the BeansProvider of this application.

Parameters

name - the name of the desired bean (optional)

Parameters

Return
the bean

See Also

lookUpBean

fun <T : Any> lookUpBean(name: String? = null, type: KClass<T>): T

Looks up the bean with the given name (if not null) and type in the BeansProvider of this application.

Parameters

name - the name of the desired bean (optional)

type - the type of the desired bean

Parameters

Return
the bean

See Also

BeansProvider.lookUpBean

@JvmStatic @JvmOverloads fun <T : Any> lookUpBean(name: String? = null, type: Class<T>): T

Looks up the bean with the given name (if not null) and type in the BeansProvider of this application.

Parameters

name - the name of the desired bean (optional)

type - the type of the desired bean

Parameters

Return
the named bean

See Also

lookUpBean