April 2018
Intermediate to advanced
246 pages
6h 11m
English
This is a special interface that you use to tell Guice which implementations go with which interfaces. Modules are objects that preserve a set of bindings. It is viable to have multiple modules in a piece of software. Injectors interact with modules to get the feasible bindings.
The module is represented by using an interface with a method referred to as Module.configure(), which ought to be overridden with the aid of the application to populate the bindings. If we rewrite our ApplicationModule by implementing the Module interface, then it would look like this:
import com.google.inject.Module;import com.packt.guice.di.impl.SMSService;import com.packt.guice.di.service.NotificationService;public class ApplicationModule implements ...