registerInstanceSupplier

fun <T : Any> registerInstanceSupplier(clazz: Class<T>, instanceSupplier: InstanceSupplier<T>)(source)

Registers a supplier returning an instance of the specified class.

The specified class still needs to be annotated with a compatible service annotation.

The difference is that instead of using the constructor of the class, the provided instance supplier is used.