Module.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| public static interface | Modules.
See the EDSL example at |
| pack-priv static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final Module |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Module | |
| public static Module | |
| public static Module | |
| public static Module | |
| public static Module | disableCircularProxiesModule()
Returns a module that will configure the injector to disable circular proxies. |
| private static Module | |
| public static Modules. | |
| public static Modules. | |
| public static Modules. | |
| public static Module | requireAtInjectOnConstructorsModule()
Returns a module that will configure the injector to require @ |
| public static Module | requireExactBindingAnnotationsModule()
Returns a module that will configure the injector to require an exactly matching binding annotation. |
| public static Module | requireExplicitBindingsModule()
Returns a module that will configure the injector to require explicit bindings. |
| EMPTY_MODULE | back to summary |
|---|---|
| public static final Module EMPTY_MODULE | |
| Modules | back to summary |
|---|---|
| private Modules() | |
| combine | back to summary |
|---|---|
| public static Module combine(Module... modules) Returns a new module that installs all of Although sometimes helpful, this method is rarely necessary. Most Guice APIs accept multiple
arguments or (like | |
| combine | back to summary |
|---|---|
| public static Module combine(Module module)
Deprecated there's no need to "combine" one module; just install it directly.
| |
| combine | back to summary |
|---|---|
| public static Module combine()
Deprecated this method call is effectively a no-op, just remove it.
| |
| combine | back to summary |
|---|---|
| public static Module combine(Iterable<? extends Module> modules) Returns a new module that installs all of Although sometimes helpful, this method is rarely necessary. Most Guice APIs accept multiple
arguments or (like | |
| disableCircularProxiesModule | back to summary |
|---|---|
| public static Module disableCircularProxiesModule() Returns a module that will configure the injector to disable circular proxies.
| |
| extractScanners | back to summary |
|---|---|
| private static Module extractScanners(Iterable<Element> elements) | |
| override | back to summary |
|---|---|
| public static Modules. Returns a builder that creates a module that overlays override modules over the given modules.
If a key is bound in both sets of modules, only the binding from the override modules is kept.
If a single
Module functionalTestModule
= Modules.override(new ProductionModule()).with(new TestModule());
Prefer to write smaller modules that can be reused and tested without overrides.
| |
| override | back to summary |
|---|---|
| public static Modules. Deprecated there's no reason to use
| |
| override | back to summary |
|---|---|
| public static Modules. Returns a builder that creates a module that overlays override modules over the given modules.
If a key is bound in both sets of modules, only the binding from the override modules is kept.
If a single
Module functionalTestModule
= Modules.override(getProductionModules()).with(getTestModules());
Prefer to write smaller modules that can be reused and tested without overrides. | |
| requireAtInjectOnConstructorsModule | back to summary |
|---|---|
| public static Module requireAtInjectOnConstructorsModule() Returns a module that will configure the injector to require @
| |
| requireExactBindingAnnotationsModule | back to summary |
|---|---|
| public static Module requireExactBindingAnnotationsModule() Returns a module that will configure the injector to require an exactly matching binding annotation.
| |
| requireExplicitBindingsModule | back to summary |
|---|---|
| public static Module requireExplicitBindingsModule() Returns a module that will configure the injector to require explicit bindings.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | configure(Binder binder)
Implements com. binder.
|
| modulesSet | back to summary |
|---|---|
| pack-priv final Set<Module> modulesSet | |
| CombinedModule | back to summary |
|---|---|
| pack-priv CombinedModule(Iterable<? extends Module> modules) | |
| configure | back to summary |
|---|---|
| public void configure(Binder binder) Implements com. Doc from com. Contributes bindings and other configurations for this module to Do not invoke this method directly to install submodules. Instead use
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | configure(Binder binder)
Implements com. binder.
|
| DisableCircularProxiesModule | back to summary |
|---|---|
| private DisableCircularProxiesModule() | |
| configure | back to summary |
|---|---|
| public void configure(Binder binder) Implements com. Doc from com. Contributes bindings and other configurations for this module to Do not invoke this method directly to install submodules. Instead use
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | configure(Binder binder)
Implements com. binder.
|
| EmptyModule | back to summary |
|---|---|
| private EmptyModule() | |
| configure | back to summary |
|---|---|
| public void configure(Binder binder) Implements com. Doc from com. Contributes bindings and other configurations for this module to Do not invoke this method directly to install submodules. Instead use
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected Void | visitOther(Element element)
Overrides com. |
| pack-priv void |
| binder | back to summary |
|---|---|
| protected final Binder binder | |
| ModuleWriter | back to summary |
|---|---|
| pack-priv ModuleWriter(Binder binder) | |
| visitOther | back to summary |
|---|---|
| protected Void visitOther(Element element) Overrides com. Doc from com. Default visit implementation. Returns
| |
| writeAll | back to summary |
|---|---|
| pack-priv void writeAll(Iterable<? extends Element> elements) | |
override().
| with | back to summary |
|---|---|
| public Module with(Module... overrides) See the EDSL example at | |
| with | back to summary |
|---|---|
| public Module with()
Deprecated there's no reason to use
| |
| with | back to summary |
|---|---|
| public Module with(Iterable<? extends Module> overrides) See the EDSL example at | |
| Modifier and Type | Field and Description |
|---|---|
| private final ImmutableSet | |
| private final ImmutableSet |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | configure()
Overrides com. Binder via the exposed methods.
|
| private Scope |
| baseModules | back to summary |
|---|---|
| private final ImmutableSet<Module> baseModules | |
| overrides | back to summary |
|---|---|
| private final ImmutableSet<Module> overrides | |
| OverrideModule | back to summary |
|---|---|
| pack-priv OverrideModule(Iterable<? extends Module> overrides, ImmutableSet<Module> baseModules) | |
| configure | back to summary |
|---|---|
| public void configure() Overrides com. Doc from com. Configures a
| |
| getScopeInstanceOrNull | back to summary |
|---|---|
| private Scope getScopeInstanceOrNull(Binding<?> binding) | |
| Modifier and Type | Field and Description |
|---|---|
| private final ImmutableSet |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Module | with(Module... overrides)
Implements com. override().
|
| public Module | |
| public Module | with(Iterable<? extends Module> overrides)
Implements com. override().
|
| baseModules | back to summary |
|---|---|
| private final ImmutableSet<Module> baseModules | |
| RealOverriddenModuleBuilder | back to summary |
|---|---|
| private RealOverriddenModuleBuilder(Iterable<? extends Module> baseModules) | |
| with | back to summary |
|---|---|
| public Module with(Module... overrides) Implements com. Doc from com. See the EDSL example at
| |
| with | back to summary |
|---|---|
| public Module with() Implements com.
| |
| with | back to summary |
|---|---|
| public Module with(Iterable<? extends Module> overrides) Implements com. Doc from com. See the EDSL example at
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | configure(Binder binder)
Implements com. binder.
|
| RequireAtInjectOnConstructorsModule | back to summary |
|---|---|
| private RequireAtInjectOnConstructorsModule() | |
| configure | back to summary |
|---|---|
| public void configure(Binder binder) Implements com. Doc from com. Contributes bindings and other configurations for this module to Do not invoke this method directly to install submodules. Instead use
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | configure(Binder binder)
Implements com. binder.
|
| RequireExactBindingAnnotationsModule | back to summary |
|---|---|
| private RequireExactBindingAnnotationsModule() | |
| configure | back to summary |
|---|---|
| public void configure(Binder binder) Implements com. Doc from com. Contributes bindings and other configurations for this module to Do not invoke this method directly to install submodules. Instead use
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | configure(Binder binder)
Implements com. binder.
|
| RequireExplicitBindingsModule | back to summary |
|---|---|
| private RequireExplicitBindingsModule() | |
| configure | back to summary |
|---|---|
| public void configure(Binder binder) Implements com. Doc from com. Contributes bindings and other configurations for this module to Do not invoke this method directly to install submodules. Instead use
| |