I have an object in Guice with scope singleton. In method f()
I want to create a new object but let Guice do the injection.
I think it is not a good practice to pass the injector around.
So how can I get a new "Guicy" instance of object?
Asked
Active
Viewed 143 times
3

oshai
- 14,865
- 26
- 84
- 140
-
1I just came to write the same question, hope you get a good answer – ekeren Mar 22 '12 at 09:56
-
1Perhaps you can use a provider http://code.google.com/p/google-guice/wiki/InjectingProviders – eiden Mar 23 '12 at 13:27