doc / ch.tutteli.atrium.creating / ComponentFactoryContainer / buildOrNull

buildOrNull

abstract fun <I : Any> buildOrNull(kClass: KClass<I>): I? (source)

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.

Exceptions

ClassCastException - in case the factory returns an illegal type.