Package com.google.inject.multibindings
Class MultibindingsScanner
- java.lang.Object
-
- com.google.inject.multibindings.MultibindingsScanner
-
public class MultibindingsScanner extends java.lang.Object
Scans a module for annotations that signal multibindings, mapbindings, and optional bindings.- Since:
- 4.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
asModule
public static Module 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
public static ModuleAnnotatedMethodScanner scanner()
Returns aModuleAnnotatedMethodScanner
that, when bound, will scan all modules for methods with the annotations @ProvidesIntoMap
, @ProvidesIntoSet
, and @ProvidesIntoOptional
.
-
-