We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dagger is allowing to do smthg like this
interface IFooDi : IFoo, IFooUi @Binds @AppScope abstract fun fooDi(instance: Foo): IFooDi @Binds @AppScope abstract fun foo(instance: IFooDi): IFoo @Binds @AppScope abstract fun fooUi(instance: IFooDi): IFooUi
but with toothpick, you should write a lot of provider classes like
bind(IFooDi::class.java).to(Foo::class.java).singleton() bind(IFooUi::class.java).toProvider(FooUiProvider::class.java).providesSingleton() bind(IFoo::class.java).toProvider(FooProvider::class.java).providesSingleton() class FooUiProvider @Inject constructor( private val instance: IFooDi ) : Provider<IFooUi> { override fun get() = instance } class FooProvider @Inject constructor( private val instance: IFooDi ) : Provider<IFoo> { override fun get() = instance }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Dagger is allowing to do smthg like this
but with toothpick, you should write a lot of provider classes like
The text was updated successfully, but these errors were encountered: