Package org.eclipse.sisu.space
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
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
MediationListener.Mediation<Q extends Annotation,
T, W> Record containing all the necessary details about a mediated watcher. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final javax.inject.Provider<BeanLocator>
private final List<MediationListener.Mediation<?,
?, ?>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterInjection
(Object watcher) <T> void
hear
(com.google.inject.TypeLiteral<T> type, com.google.inject.spi.TypeEncounter<T> encounter) boolean
matches
(com.google.inject.TypeLiteral<?> type) void
Adds aMediationListener.Mediation
record containing the necessary details about a mediated watcher.Methods inherited from class com.google.inject.matcher.AbstractMatcher
and, or
-
Field Details
-
mediation
-
locator
-
-
Constructor Details
-
MediationListener
public MediationListener(com.google.inject.Binder binder)
-
-
Method Details
-
mediate
Adds aMediationListener.Mediation
record containing the necessary details about a mediated watcher.- Parameters:
key
- The watched keymediator
- The bean mediatorwatcherType
- The watcher type
-
matches
public boolean matches(com.google.inject.TypeLiteral<?> type) - Specified by:
matches
in interfacecom.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 interfacecom.google.inject.spi.TypeListener
-
afterInjection
- Specified by:
afterInjection
in interfacecom.google.inject.spi.InjectionListener<Object>
-