Class LocatorWiring

java.lang.Object
org.eclipse.sisu.wire.LocatorWiring
All Implemented Interfaces:
Wiring

public final class LocatorWiring extends Object implements Wiring
Adds BeanLocator-backed bindings for unresolved bean dependencies.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final BeanProviders
     
    private final com.google.inject.Binder
     
    private static final Hidden
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    LocatorWiring(com.google.inject.Binder binder)
     
  • Method Summary

    Modifier and Type
    Method
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • HIDDEN_WIRING

      private static final Hidden HIDDEN_WIRING
    • beanProviders

      private final BeanProviders 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.
      Specified by:
      wire in interface Wiring
      Parameters:
      key - The dependency key
      Returns:
      true if the wiring succeeded; otherwise false
    • bindMapImport

      private void bindMapImport(com.google.inject.Key key)
      Adds an imported Map 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 imported List 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 appropriate BeanEntry 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 imported Set 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 and Qualifier 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 the BeanLocator code.
      Parameters:
      type - The implicit type