Skip to content

Instantly share code, notes, and snippets.

@ronshapiro
ronshapiro / ReusableInjection.kt
Created October 2, 2017 14:26 — forked from ZacSweers/ReusableInjection.kt
Reusable injections
class Parent {
// Somewhere in here, a lot of external service modules are included and contribute their `Service` impls to this multibinding
@Inject lateinit var services: Map<String, Provider<Service>>
fun showChild() {
addChildController(serviceKey = "barServiceKey") // Key into the services map
}
}