https://google.github.io/guice/api-docs/4.2/javadoc/com/google/inject/AbstractModule.html#requireBinding-java.lang.Class- is a very nice feature in Guice. It allows the caller to be notified very early on that DI will fail. What's more helpful is if we can provide an error message such as "binding XXX isn't provided, did you forget to install XXXModule?".
https://google.github.io/guice/api-docs/4.2/javadoc/com/google/inject/AbstractModule.html#requireBinding-java.lang.Class- is a very nice feature in Guice. It allows the caller to be notified very early on that DI will fail. What's more helpful is if we can provide an error message such as "binding XXX isn't provided, did you forget to install XXXModule?".