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 Module
asModule()
Returns a module that, when installed, will scan all modules for methods with the annotations @ProvidesIntoMap
, @ProvidesIntoSet
, and @ProvidesIntoOptional
.static ModuleAnnotatedMethodScanner
scanner()
Returns aModuleAnnotatedMethodScanner
that, 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 aModuleAnnotatedMethodScanner
that, when bound, will scan all modules for methods with the annotations @ProvidesIntoMap
, @ProvidesIntoSet
, and @ProvidesIntoOptional
.
-