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 BeanProvidersprivate final com.google.inject.Binderprivate static final Hidden -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate <T> voidbindBeanImport(com.google.inject.Key<T> key) Adds an imported bean binding; uses the type andQualifierannotation to determine the search details.private voidbindImplicitType(com.google.inject.TypeLiteral type) Captures the original implicit binding that would have been used by Guice; see theBeanLocatorcode.private voidbindListImport(com.google.inject.Key key) Adds an importedListbinding; uses the generic type arguments to determine the search details.private voidbindMapImport(com.google.inject.Key key) Adds an importedMapbinding; uses the generic type arguments to determine the search details.private voidbindSetImport(com.google.inject.Key key) Adds an importedSetbinding; uses the generic type arguments to determine the search details.private com.google.inject.ProvidergetBeanEntriesProvider(com.google.inject.TypeLiteral entryType) Returns the appropriateBeanEntryprovider for the given entry type.booleanwire(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:WiringAttempts to satisfy the given dependency by applying a local binding. -
bindMapImport
private void bindMapImport(com.google.inject.Key key) Adds an importedMapbinding; 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 importedListbinding; 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 appropriateBeanEntryprovider 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 importedSetbinding; 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 andQualifierannotation 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 theBeanLocatorcode.- Parameters:
type- The implicit type
-