buildOrNull

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

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

Throws

in case the factory returns an illegal type.