Open GoogleCodeExporter opened 9 years ago
One of the main deciders on this issue is whether or not assisted inject should
remain an extension, or be promoted to core guice. If not the latter, modifying
Injector to support an extension may not fly.
Original comment by fernc...@gmail.com
on 31 Aug 2009 at 5:51
I think more important than that we want to discourage people from using
Injector.getInstance() and instead
prefer viral dependency injection (@Inject everywhere).
For example, in the GS2 programming model, you never call getInstance() from
anywhere and never deal with
the injector. It sits in the background doing all the work, while you simply
use your services as they are needed.
Original comment by dha...@gmail.com
on 31 Aug 2009 at 11:44
You can use the AssistedInject extension to provide parameters to dependencies.
The
Injector will not support this because it makes it much more complex to figure
out
the dependency chain and is overall a bad thing for understanding code. More
than
that, it is a bad practice to inject the Injector, and this would require that.
Original comment by sberlin
on 2 May 2010 at 12:30
Original issue reported on code.google.com by
kua...@gmail.com
on 31 Aug 2009 at 2:42