android-beans / rocks.frieler.android.beans.scopes.prototype / prototypeBean

prototypeBean

inline fun <reified T : Any> DeclarativeBeanConfiguration.prototypeBean(name: String? = null, noinline definition: BeansProvider.() -> T): Unit

Adds a BeanDefinition for a PrototypeScopedFactoryBean that produces a bean with the given definition, optionally with the specified name.

Parameters

name - the bean's name (optional)

definition - the definition to construct the bean

Parameters