public final class LocatorWiring extends java.lang.Object implements Wiring
BeanLocator
-backed bindings for unresolved bean dependencies.Modifier and Type | Field and Description |
---|---|
private BeanProviders |
beanProviders |
private com.google.inject.Binder |
binder |
private static Hidden |
HIDDEN_WIRING |
Constructor and Description |
---|
LocatorWiring(com.google.inject.Binder binder) |
Modifier and Type | Method and Description |
---|---|
private <T> void |
bindBeanImport(com.google.inject.Key<T> key)
Adds an imported bean binding; uses the type and
Qualifier annotation to determine the search details. |
private void |
bindImplicitType(com.google.inject.TypeLiteral type)
Captures the original implicit binding that would have been used by Guice; see the
BeanLocator code. |
private void |
bindListImport(com.google.inject.Key key)
Adds an imported
List binding; uses the generic type arguments to determine the search details. |
private void |
bindMapImport(com.google.inject.Key key)
Adds an imported
Map binding; uses the generic type arguments to determine the search details. |
private void |
bindSetImport(com.google.inject.Key key)
Adds an imported
Set binding; uses the generic type arguments to determine the search details. |
private com.google.inject.Provider |
getBeanEntriesProvider(com.google.inject.TypeLiteral entryType)
Returns the appropriate
BeanEntry provider for the given entry type. |
boolean |
wire(com.google.inject.Key<?> key)
Attempts to satisfy the given dependency by applying a local binding.
|
private static final Hidden HIDDEN_WIRING
private final BeanProviders beanProviders
private final com.google.inject.Binder binder
public boolean wire(com.google.inject.Key<?> key)
Wiring
private void bindMapImport(com.google.inject.Key key)
Map
binding; uses the generic type arguments to determine the search details.key
- The dependency keyprivate void bindListImport(com.google.inject.Key key)
List
binding; uses the generic type arguments to determine the search details.key
- The dependency keyprivate com.google.inject.Provider getBeanEntriesProvider(com.google.inject.TypeLiteral entryType)
BeanEntry
provider for the given entry type.entryType
- The entry typeprivate void bindSetImport(com.google.inject.Key key)
Set
binding; uses the generic type arguments to determine the search details.key
- The dependency keyprivate <T> void bindBeanImport(com.google.inject.Key<T> key)
Qualifier
annotation to determine the search details.key
- The dependency keyprivate void bindImplicitType(com.google.inject.TypeLiteral type)
BeanLocator
code.type
- The implicit type