InternalInjectorCreator to recursively create a tree of
uninitialized Injectors. Each InjectorShell corresponds to either the top-level root
injector, or a private child injector.
The root InjectorShell extracts elements from its list of modules and processes these elements
to aggregate data that is used to populate its injector's fields. Child injectors are constructed
similarly, but using PrivateElements instead of modules.
It is necessary to create the root and child injectors in a single batch because there can be
bidirectional parent <-> child injector dependencies that require the entire tree of
injectors to be initialized together in the InternalInjectorCreator.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private final InjectorImpl |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static void | bindInjector(InjectorImpl injector)
The Injector is a special case because we allow both parent and child injectors to both have a binding for that key. |
| private static void | bindLogger(InjectorImpl injector)
The Logger is a special case because it knows the injection point of the injected member. |
| private static void | |
| pack-priv List | |
| pack-priv InjectorImpl |
| elements | back to summary |
|---|---|
| private final List<Element> elements | |
| injector | back to summary |
|---|---|
| private final InjectorImpl injector | |
| InjectorShell | back to summary |
|---|---|
| private InjectorShell(List<Element> elements, InjectorImpl injector) | |
| bindInjector | back to summary |
|---|---|
| private static void bindInjector(InjectorImpl injector) The Injector is a special case because we allow both parent and child injectors to both have a binding for that key. | |
| bindLogger | back to summary |
|---|---|
| private static void bindLogger(InjectorImpl injector) The Logger is a special case because it knows the injection point of the injected member. It's the only binding that does this. | |
| bindStage | back to summary |
|---|---|
| private static void bindStage(InjectorImpl injector, Stage stage) | |
| getElements | back to summary |
|---|---|
| pack-priv List | |
| getInjector | back to summary |
|---|---|
| pack-priv InjectorImpl getInjector() | |
| Modifier and Type | Field and Description |
|---|---|
| private InjectorBindingData | |
| private final List | |
| private InjectorJitBindingData | |
| private final List | |
| private InjectorImpl. | |
| private InjectorImpl | |
| private PrivateElementsImpl | privateElements
null unless this exists in a |
| private Stage |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv List | build(Initializer initializer, ProcessedBindingData processedBindingData, ContinuousStopwatch stopwatch, Errors errors)
Creates and returns the injector shells for the current modules. |
| pack-priv Stage | |
| pack-priv Object | |
| pack-priv InjectorShell. | |
| pack-priv InjectorShell. | |
| pack-priv InjectorShell. |
| bindingData | back to summary |
|---|---|
| private InjectorBindingData bindingData | |
| elements | back to summary |
|---|---|
| private final List<Element> elements | |
| jitBindingData | back to summary |
|---|---|
| private InjectorJitBindingData jitBindingData | |
| modules | back to summary |
|---|---|
| private final List<Module> modules | |
| options | back to summary |
|---|---|
| private InjectorImpl. | |
| parent | back to summary |
|---|---|
| private InjectorImpl parent | |
| privateElements | back to summary |
|---|---|
| private PrivateElementsImpl privateElements null unless this exists in a | |
| stage | back to summary |
|---|---|
| private Stage stage | |
| Builder | back to summary |
|---|---|
| pack-priv Builder() | |
| addModules | back to summary |
|---|---|
| pack-priv void addModules(Iterable<? extends Module> modules) | |
| build | back to summary |
|---|---|
| pack-priv List Creates and returns the injector shells for the current modules. Multiple shells will be
returned if any modules contain | |
| getStage | back to summary |
|---|---|
| pack-priv Stage getStage() | |
| lock | back to summary |
|---|---|
| pack-priv Object lock() Synchronize on this before calling | |
| parent | back to summary |
|---|---|
| pack-priv InjectorShell. | |
| privateElements | back to summary |
|---|---|
| pack-priv InjectorShell. | |
| stage | back to summary |
|---|---|
| pack-priv InjectorShell. | |
| Modifier and Type | Field and Description |
|---|---|
| private final InjectorBindingData |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | configure(Binder binder)
Implements com. binder.
|
| bindingData | back to summary |
|---|---|
| private final InjectorBindingData bindingData | |
| InheritedScannersModule | back to summary |
|---|---|
| pack-priv InheritedScannersModule(InjectorBindingData bindingData) | |
| 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 Injector | get(InternalContext
of this injection context, Dependency<?> dependency, boolean true if getting as a result of a linked binding linked)Implements com. |
| public Injector | |
| public String |
| injector | back to summary |
|---|---|
| private final Injector injector | |
| InjectorFactory | back to summary |
|---|---|
| private InjectorFactory(Injector injector) | |
| get | back to summary |
|---|---|
| public Injector get(InternalContext context, Dependency<?> dependency, boolean linked) Implements com. Doc from com. Creates an object to be injected.
| |
| get | back to summary |
|---|---|
| public Injector get() Implements com. Doc from com. Provides an instance of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Logger | get(InternalContext
of this injection context, Dependency<?> dependency, boolean true if getting as a result of a linked binding linked)Implements com. |
| public Logger | |
| public String |
| LoggerFactory | back to summary |
|---|---|
| private LoggerFactory() | |
| get | back to summary |
|---|---|
| public Logger get(InternalContext context, Dependency<?> dependency, boolean linked) Implements com. Doc from com. Creates an object to be injected.
| |
| get | back to summary |
|---|---|
| public Logger get() Implements com. Doc from com. Provides an instance of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | configure(Binder binder)
Implements com. binder.
|
| RootModule | back to summary |
|---|---|
| private RootModule() | |
| 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
| |