Package org.eclipse.sisu.wire
Class LocatorWiring
- java.lang.Object
-
- org.eclipse.sisu.wire.LocatorWiring
-
- All Implemented Interfaces:
Wiring
public final class LocatorWiring extends java.lang.Object implements Wiring
AddsBeanLocator
-backed bindings for unresolved bean dependencies.
-
-
Field Summary
Fields Modifier and Type Field Description private BeanProviders
beanProviders
private com.google.inject.Binder
binder
private static Hidden
HIDDEN_WIRING
-
Constructor Summary
Constructors Constructor Description LocatorWiring(com.google.inject.Binder binder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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 Detail
-
HIDDEN_WIRING
private static final Hidden HIDDEN_WIRING
-
beanProviders
private final BeanProviders beanProviders
-
binder
private final com.google.inject.Binder binder
-
-
Method Detail
-
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
-
-