Package com.google.inject.multibindings
Class MultibindingsScanner
java.lang.Object
com.google.inject.multibindings.MultibindingsScanner
Scans a module for annotations that signal multibindings, mapbindings, and optional bindings.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic ModuleasModule()Returns a module that, when installed, will scan all modules for methods with the annotations @ProvidesIntoMap, @ProvidesIntoSet, and @ProvidesIntoOptional.static ModuleAnnotatedMethodScannerscanner()Returns aModuleAnnotatedMethodScannerthat, when bound, will scan all modules for methods with the annotations @ProvidesIntoMap, @ProvidesIntoSet, and @ProvidesIntoOptional.
-
Method Details
-
asModule
Returns a module that, when installed, will scan all modules for methods with the annotations @ProvidesIntoMap, @ProvidesIntoSet, and @ProvidesIntoOptional.This is a convenience method, equivalent to doing
binder().scanModulesForAnnotatedMethods(MultibindingsScanner.scanner()). -
scanner
Returns aModuleAnnotatedMethodScannerthat, when bound, will scan all modules for methods with the annotations @ProvidesIntoMap, @ProvidesIntoSet, and @ProvidesIntoOptional.
-