ComponentFactoryContainer

Manages the factories to create the different components of Atrium. It takes basically the responsibility of a dependency injection facility, tailored for Atrium.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Returns the component of type I using a corresponding factory or throws an IllegalStateException in case no factory was found which is able to build a component of the given type.

Link copied to clipboard

Returns a chain of components of type I using a corresponding factory or throws an IllegalStateException in case no factory was found which is able to build a chain of components of the given type.

Link copied to clipboard
abstract fun <I : Any> buildChainedOrNull(kClass: KClass<I>): Sequence<I>?

Returns a chain of components of type I using a corresponding chain of factories or null in case no chain was found which is able to build a chain of components of the given type.

Link copied to clipboard
abstract fun <I : Any> buildOrNull(kClass: KClass<I>): I?

Returns the component of type I using a corresponding factory or null in case no factory was found which is able to build a component of the given type.

Link copied to clipboard

Returns a chain of factories which shall build a chain of components of the specified kClass or null in case no chain was found which is able to build a chain of components of the given type.

Link copied to clipboard
abstract fun getFactoryOrNull(kClass: KClass<*>): ComponentFactory?

Returns a factory which is able to build a component for the given kClass or null in case no factory was found which is able to build a component of the given type.

Link copied to clipboard
abstract fun merge(componentFactoryContainer: ComponentFactoryContainer?): ComponentFactoryContainer

Merges the given componentFactoryContainer (if not null) with this ComponentFactoryContainer creating a new ComponentFactoryContainer where defined dependencies in componentFactoryContainer will have precedence over dependencies defined in this instance.