ktp / toothpick.ktp.binding / CanBeNamed / withName

withName

fun withName(name: String): CanBeBound<T>

DSL method to give a name (String) to a binding.

Parameters

name - the {@link String} used as a name for this binding.

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

fun withName(annotationClassWithQualifierAnnotation: KClass<out Annotation>): CanBeBound<T>

DSL method to give a name (annotation class) to a binding.

Parameters

annotationClassWithQualifierAnnotation - the {@link KClass} used as a name for this binding.

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