interface ComponentFactoryContainer
(source)
Manages the factories to create the different components of Atrium. It takes basically the responsibility of a dependency injection facility, tailored for Atrium.
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 |
|
abstract fun <I : Any> buildOrNull(kClass: KClass<I>): I?
Returns the component of type I using a corresponding factory or |
|
abstract fun getFactoryForChainedOrNull(kClass: KClass<*>): Sequence<ComponentFactory>?
Returns a chain of factories which shall build a chain of components of the specified kClass
or |
|
abstract fun getFactoryOrNull(kClass: KClass<*>): ComponentFactory?
Returns a factory which is able to build a component for the given kClass
or |
|
abstract fun merge(componentFactoryContainer: ComponentFactoryContainer?): ComponentFactoryContainer
Merges the given componentFactoryContainer (if not |
fun createIfNotEmpty(components: Map<KClass<*>, ComponentFactory>, chainedComponents: Map<KClass<*>, Sequence<ComponentFactory>>): ComponentFactoryContainer? |
fun <I : Any> ComponentFactoryContainer.build(): I
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. |
|
fun <I : Any> ComponentFactoryContainer.buildChained(): Sequence<I>
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. |
object DefaultComponentFactoryContainer : ComponentFactoryContainer |