Package org.eclipse.sisu.wire
Class LocatorWiring
java.lang.Object
org.eclipse.sisu.wire.LocatorWiring
- All Implemented Interfaces:
Wiring
Adds
BeanLocator
-backed bindings for unresolved bean dependencies.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BeanProviders
private final com.google.inject.Binder
private static final Hidden
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate <T> void
bindBeanImport
(com.google.inject.Key<T> key) Adds an imported bean binding; uses the type andQualifier
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 theBeanLocator
code.private void
bindListImport
(com.google.inject.Key key) Adds an importedList
binding; uses the generic type arguments to determine the search details.private void
bindMapImport
(com.google.inject.Key key) Adds an importedMap
binding; uses the generic type arguments to determine the search details.private void
bindSetImport
(com.google.inject.Key key) Adds an importedSet
binding; uses the generic type arguments to determine the search details.private com.google.inject.Provider
getBeanEntriesProvider
(com.google.inject.TypeLiteral entryType) Returns the appropriateBeanEntry
provider for the given entry type.boolean
wire
(com.google.inject.Key<?> key) Attempts to satisfy the given dependency by applying a local binding.
-
Field Details
-
HIDDEN_WIRING
-
beanProviders
-
binder
private final com.google.inject.Binder binder
-
-
Constructor Details
-
LocatorWiring
public LocatorWiring(com.google.inject.Binder binder)
-
-
Method Details
-
wire
public boolean wire(com.google.inject.Key<?> key) Description copied from interface:Wiring
Attempts to satisfy the given dependency by applying a local binding. -
bindMapImport
private void bindMapImport(com.google.inject.Key key) Adds an importedMap
binding; uses the generic type arguments to determine the search details.- Parameters:
key
- The dependency key
-
bindListImport
private void bindListImport(com.google.inject.Key key) Adds an importedList
binding; uses the generic type arguments to determine the search details.- Parameters:
key
- The dependency key
-
getBeanEntriesProvider
private com.google.inject.Provider getBeanEntriesProvider(com.google.inject.TypeLiteral entryType) Returns the appropriateBeanEntry
provider for the given entry type.- Parameters:
entryType
- The entry type- Returns:
- Provider of bean entries
-
bindSetImport
private void bindSetImport(com.google.inject.Key key) Adds an importedSet
binding; uses the generic type arguments to determine the search details.- Parameters:
key
- The dependency key
-
bindBeanImport
private <T> void bindBeanImport(com.google.inject.Key<T> key) Adds an imported bean binding; uses the type andQualifier
annotation to determine the search details.- Parameters:
key
- The dependency key
-
bindImplicitType
private void bindImplicitType(com.google.inject.TypeLiteral type) Captures the original implicit binding that would have been used by Guice; see theBeanLocator
code.- Parameters:
type
- The implicit type
-