Closed GoogleCodeExporter closed 8 years ago
AFAICT, this is how Guice's AssistedInject work too: it doesn't care which
scope you use, and a no-arg method is no different than any other.
BTW, rather than adding a method to the Ginjector, you'd probably rather inject
a Provider<UserSearchActivity>.
Original comment by t.broyer
on 9 Apr 2013 at 2:58
I was hoping I could retrieve all my activities from the same factory
regardless of their scope or their assisted/non-assisted nature but I think I'm
asking too much.
You're right, I can use a Provider for all my non-assisted activities so I can
make them singleton or not without changing anything else. It's not as perfect
as I wanted but certainly good enough.
Original comment by xavier.d...@gmail.com
on 9 Apr 2013 at 5:20
This is indeed working as intended and Providers are the workaround you're
looking for. AssistedInject does not support scopes and it should be an error
to have scope annotations on assisted types or factories (right now they're
just ignored).
Original comment by aragos
on 10 Apr 2013 at 1:56
Original issue reported on code.google.com by
xavier.d...@gmail.com
on 9 Apr 2013 at 2:49