ClaudiuB
10/25/2017, 7:22 PMinject
as an extension function from the class that is to be Injected. I'm thinking of something like this
abstract class Injectable <T : SomeBaseComponent> {
abstract fun T.inject(activity: Injectable)
}
but the more I think about it,
1. the less sense it makes to be possible to do (especially when you're adding a method to an existing interface)
2. making the T
method abstract makes the class abstract (??)
3. I would actually want sublasses of Injectable
to be passed, not the bass class itself.
Anything that can be done close to that maybe? 🤔