Package org.elasticsearch.common.inject
Interface Module
-
- All Known Implementing Classes:
AbstractModule,ActionModule,ClusterModule,GatewayModule,IndicesModule,MapBinder.RealMapBinder,Multibinder.RealMultibinder,PrivateModule,ProviderMethodsModule,SettingsModule
public interface ModuleA module contributes configuration information, typically interface bindings, which will be used to create anInjector. A Guice-based application is ultimately composed of little more than a set ofModules and some bootstrapping code.Your Module classes can use a more streamlined syntax by extending
AbstractModulerather than implementing this interface directly.In addition to the bindings configured via
configure(org.elasticsearch.common.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 Detail
-
configure
void configure(Binder binder)
Contributes bindings and other configurations for this module tobinder.Do not invoke this method directly to install submodules. Instead use
Binder.install(Module), which ensures thatprovider methodsare discovered.
-
-