With basics of Guice covered, we are now ready to get into more challenging cases in the application development. These issues are addressed with the Guice features such as
Binding collections, and
Scoping. These are discussed in detail with several examples. Examples are available for these discussions in
So far, we have worked with directly injecting dependencies. Yet, there are a few cases where injecting direct dependencies may not be an appropriate choice. Let's discuss such scenarios, and figure out how a
Factory style Provider class provides a better way to inject dependencies.
Guice provides an instance by invoking ...