doc / ch.tutteli.atrium.core / SingleServiceLoader

SingleServiceLoader

object SingleServiceLoader (source)

Loads a service vai ServiceLoader for a given Class and throws an IllegalStateException in case it finds more than one service.

Functions

load

fun <T : Any> load(clazz: Class<T>): T

Loads a service vai ServiceLoader for a given Class and throws an IllegalStateException in case it finds more than one service.