3

I've found references to child injectors inside the Guice documentation, but other than them being used explicitly I can't find any reference to how they're created implicitly.

  • Are they created automatically for dependents of dependents?
  • Are they created automatically for submodules of modules?

I've spent quite a lot of time searching now (a few times over several days) and I feel that if the question has been asked before that I'm missing a term of phrase to search for.

Can anyone please help?

GMac
  • 31
  • 1
  • Not really clear what you're having trouble with. Do you have a code sample that you've tried and that didn't work? Or at least a skeleton that can best describe your problem, would be helpful. – Harish Apr 26 '18 at 17:14
  • 1
    I was reading through the Guice documentation on [binding resolution](https://github.com/google/guice/wiki/BindingResolution) but it does not explain how and when child injectors should be used. I read through the source (although briefly) and couldn't find how the child injectors were being used by Guice. I'm maybe assuming that they're being created automatically, because it is not immediately obvious to me why I would want to create a child injector explicitly. I've been meaning to go back and have a look at this when I have time, but I have not. Do you have any insights here? – GMac Apr 29 '18 at 14:54

0 Answers0