Dagger 2 with Kotlin, returning type with generic in ApplicationComponent
问题 I want to return type with generic to be exposed by sub-graphs, the problem is in auto-generated java-classes, I tried to do something, but the one way to solve it is to remove generic type from AppComponent and return simple object. Is there more "right" approach? Here is the AppComponent @Singleton @Component(modules = arrayOf(ApplicationModule::class)) interface ApplicationComponent { fun inject(activity: BaseActivity<MvpView, MvpPresenter<MvpView>>) //... fun dataBase(): Database<Realm> }