INNER CODE UNIT · Kotlin
Sentence
kosi-libs/Kodein · kodein-di/src/commonMain/kotlin/org/kodein/di/Copy.kt:75
public class Sentence(private val specs: MutableList<CopySpecs>) {
/**
* Defines that this spec will only correspond to **one** matching binding.
*
* @param binding The binding it should match.
* @return The binding itself to configure it (e.g. `copy the binding<Whatever>() with context<MyContext>()`).
*/
public infix fun the(binding: Binding): SearchSpecs {
return CopySpecs(all = false).also { binding.apply(it) ; specs += it }
}
/**
* Defines that this spec will only correspond to **all** matching binding.
*
* @param spec The specs of the search.
* @return The binding itself to configure it (e.g. `copy all context<MyContext>() with tag("whatever")`).
*/
public infix fun all(spec: Spec): SearchSpecs {