public class MultibindingsScanner
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
MultibindingsScanner.AnnotationOrError |
private static class |
MultibindingsScanner.Scanner |
private static class |
MultibindingsScanner.TypeAndValue<T> |
Modifier | Constructor and Description |
---|---|
private |
MultibindingsScanner() |
Modifier and Type | Method and Description |
---|---|
static Module |
asModule()
Returns a module that, when installed, will scan all modules for methods with the annotations
@
ProvidesIntoMap , @ProvidesIntoSet , and
@ProvidesIntoOptional . |
private static MultibindingsScanner.AnnotationOrError |
findMapKeyAnnotation(Binder binder,
java.lang.reflect.Method method) |
static ModuleAnnotatedMethodScanner |
scanner()
Returns a
ModuleAnnotatedMethodScanner that, when bound, will scan all modules for
methods with the annotations @ProvidesIntoMap ,
@ProvidesIntoSet , and @ProvidesIntoOptional . |
(package private) static MultibindingsScanner.TypeAndValue<?> |
typeAndValueOfMapKey(java.lang.annotation.Annotation mapKeyAnnotation) |
public static Module asModule()
ProvidesIntoMap
, @ProvidesIntoSet
, and
@ProvidesIntoOptional
.
This is a convenience method, equivalent to doing
binder().scanModulesForAnnotatedMethods(MultibindingsScanner.scanner())
.
public static ModuleAnnotatedMethodScanner scanner()
ModuleAnnotatedMethodScanner
that, when bound, will scan all modules for
methods with the annotations @ProvidesIntoMap
,
@ProvidesIntoSet
, and @ProvidesIntoOptional
.private static MultibindingsScanner.AnnotationOrError findMapKeyAnnotation(Binder binder, java.lang.reflect.Method method)
static MultibindingsScanner.TypeAndValue<?> typeAndValueOfMapKey(java.lang.annotation.Annotation mapKeyAnnotation)