android-beans / rocks.frieler.android.beans.scopes.singleton / SingletonScopedFactoryBeanHandler

SingletonScopedFactoryBeanHandler

class SingletonScopedFactoryBeanHandler : ScopedFactoryBeanHandler

ScopedFactoryBeanHandler for the singleton-scope.

It produces a new bean-instance only for the first time and re-uses it forever.

Author
Christopher Frieler

Constructors

<init>

SingletonScopedFactoryBeanHandler()

ScopedFactoryBeanHandler for the singleton-scope.

Properties

isActive

val isActive: Boolean

Checks whether the scope is active, i.e. if beans of this scope are currently available.

name

val name: String

Returns the name of the scope.

Functions

getBean

fun <T : Any> getBean(name: String, factoryBean: ScopedFactoryBean<T>, dependencies: BeansProvider): T

Returns the bean defined by the given ScopedFactoryBean.

Companion Object Properties

SINGLETON_SCOPE

const val SINGLETON_SCOPE: String