Class MediationListener

java.lang.Object
com.google.inject.matcher.AbstractMatcher<com.google.inject.TypeLiteral<?>>
org.eclipse.sisu.space.MediationListener
All Implemented Interfaces:
com.google.inject.matcher.Matcher<com.google.inject.TypeLiteral<?>>, com.google.inject.spi.InjectionListener<Object>, com.google.inject.spi.TypeListener

final class MediationListener extends com.google.inject.matcher.AbstractMatcher<com.google.inject.TypeLiteral<?>> implements com.google.inject.spi.TypeListener, com.google.inject.spi.InjectionListener<Object>
InjectionListener that listens for mediated watchers and registers them with the BeanLocator.
  • Field Details

  • Constructor Details

    • MediationListener

      public MediationListener(com.google.inject.Binder binder)
  • Method Details

    • mediate

      public void mediate(com.google.inject.Key key, Mediator mediator, Class watcherType)
      Adds a MediationListener.Mediation record containing the necessary details about a mediated watcher.
      Parameters:
      key - The watched key
      mediator - The bean mediator
      watcherType - The watcher type
    • matches

      public boolean matches(com.google.inject.TypeLiteral<?> type)
      Specified by:
      matches in interface com.google.inject.matcher.Matcher<com.google.inject.TypeLiteral<?>>
    • hear

      public <T> void hear(com.google.inject.TypeLiteral<T> type, com.google.inject.spi.TypeEncounter<T> encounter)
      Specified by:
      hear in interface com.google.inject.spi.TypeListener
    • afterInjection

      public void afterInjection(Object watcher)
      Specified by:
      afterInjection in interface com.google.inject.spi.InjectionListener<Object>