Every piece of code here is as generic as code can be. Concrete implementations and details belong to the upper layers. Being at the bottom, the domain layer is unaware of anything else in the application to the point that the code here has nothing to do with the Android framework, it’s just “pure” Kotlin. Why? Because it’s irrelevant to the purpose of the domain layer.
@Provides methods are instance methods and they need an instance of our module in order to be invoked. If our Module is abstract and contains
@Binds methods, dagger will not instantiate our module and instead directly use the
Provider of our injected parameter (
LoginPresenter in the above case).