I have component graph of
App -> User
|_-> RegistrationFlow
i..e user na registration are children of app, but don't see each other.
There is a dependency
Foo
that only needs dependencies from
App
component, so it's injectable in bot
User
and
RegFlow
, however I want to cache it per child scope. i.e instance1 in
User
and instance2 in
RegistrationFlow
as it is stateful.
Is this possible? Other than not having
@Inject
on Foo and having 2 module
@Provides
functions
Basically I want
@User
@RegistarationFlow
class Foo @Inject constructor(..)
but compiler complains