android-beans / rocks.frieler.android.beans.scopes / ScopedFactoryBeanDecorator

ScopedFactoryBeanDecorator

class ScopedFactoryBeanDecorator<T : Any> : ScopedFactoryBean<T>

Decorator for ScopedFactoryBeans to enhance their behaviour.

Parameters

Author
Christopher Frieler

Constructors

<init>

ScopedFactoryBeanDecorator(delegate: ScopedFactoryBean<T>)

Decorator for ScopedFactoryBeans to enhance their behaviour.

Properties

beanType

val beanType: KClass<T>

Returns the type of the bean produced by this ScopedFactoryBean.

scope

val scope: String

Returns the name of the scope, where the bean produced by this ScopedFactoryBean lives in.

Functions

produceBean

fun produceBean(dependencies: BeansProvider): T

Produces a new bean of type T.

withPostProcessing

fun withPostProcessing(postProcessing: (T) -> T): ScopedFactoryBeanDecorator<T>

Extension Functions

decorate

fun <T : Any> ScopedFactoryBean<T>.decorate(): ScopedFactoryBeanDecorator<T>