|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Module
A module contributes configuration information, typically interface
bindings, which will be used to create an Injector. A Guice-based
application is ultimately composed of little more than a set of
Modules and some bootstrapping code.
Your Module classes can use a more streamlined syntax by extending
AbstractModule rather than implementing this interface directly.
In addition to the bindings configured via configure(com.google.inject.Binder), bindings
will be created for all methods annotated with @Provides.
Use scope and binding annotations on these methods to configure the
bindings.
| Method Summary | |
|---|---|
void |
configure(Binder binder)
Contributes bindings and other configurations for this module to binder. |
| Method Detail |
|---|
void configure(Binder binder)
binder.
Do not invoke this method directly to install submodules. Instead use
Binder.install(Module), which ensures that provider methods are
discovered.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||