public class NetworkModule
extends com.google.inject.AbstractModule
This defines a GUICE module that handles the configuration of network library dependencies, hence eliminating the need for factories in this library.
network
instance without accessing specific implementations, we build our
GUICE injector from this module like so: Injector injector = Guice.createInjector(new NetworkModule());
From this point on you can get API objects like this:
Network network = injector.getInstance(Network.class);
Constructor and Description |
---|
NetworkModule() |