Exploring a custom extension involves understanding how the custom extension works and what purpose it serves. In this topic, we will analyze guice-multibinder. During this, we will first inspect the important classes and interfaces in it, and later, how it provides an implementation of the extensions SPI. We will also explore the binding collection case in FlightEngineModule, where we prepare a collection of bindings using guice-multibinder.
Note
We discussed guice-multibinder extension in Chapter 3, Diving Deeper in Guice to illustrate binding collections. We pick it up again to explore the extensions SPI, because it gives us a good ground to analyze Injector bindings and a custom extensions case.
Let's look at the following class diagram for a few of the classes and interfaces in guice-multibinder extension. This is not a complete diagram, and discusses only relevant pieces, which come into action while we are discussing its internal working...