expect fun <T : Any> loadSingleService(kClass: KClass<T>): T
(source)
Loads the service for the given kClass and throws an IllegalStateException if it finds more than one.
NoSuchElementException
- in case there is no service found for kClass.
IllegalStateException
- in case there is more than one service found for kClass.
Return
The loaded service.