ktp / toothpick.ktp.binding / CanBeBound / toClass

toClass

fun toClass(implClass: KClass<out T>): CanBeSingleton<T>

DSL method to associate an implementation class to a binding.

Parameters

implClass - the {@link KClass} used as an implementation class for this binding.

Return
a binding statement for this key, with the implementation class {@code implClass} that can be further customized.

inline fun <reified P : T> toClass(): CanBeSingleton<T>

DSL method to associate an implementation class to a binding, more Kotlin friendly.

Return
a binding statement for this key, with the implementation class {@code T} that can be further customized.

See Also

Binding.CanBeBound.toClass