3

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?

oshai
  • 14,865
  • 26
  • 84
  • 140

1 Answers1

2

As suggested above, probably provider is the way to do it. it is also mentioned in this question.

Community
  • 1
  • 1
oshai
  • 14,865
  • 26
  • 84
  • 140