Package org.eclipse.sisu.inject
Class InjectorBindings
java.lang.Object
org.eclipse.sisu.inject.InjectorBindings
- All Implemented Interfaces:
BindingPublisher
-
Constructor Summary
ConstructorsConstructorDescriptionInjectorBindings
(com.google.inject.Injector injector) InjectorBindings
(com.google.inject.Injector injector, RankingFunction function) -
Method Summary
Modifier and TypeMethodDescription<T> T
Attempts to adapt this publisher to the given type.boolean
static BindingPublisher
findBindingPublisher
(com.google.inject.Injector injector) static RankingFunction
findRankingFunction
(com.google.inject.Injector injector) int
hashCode()
int
Estimates the maximum rank this publisher may assign to aBinding
.<T> void
subscribe
(BindingSubscriber<T> subscriber) Subscribes the givenBindingSubscriber
to receiveBinding
s.toString()
<T> void
unsubscribe
(BindingSubscriber<T> subscriber) Stops the givenBindingSubscriber
from receivingBinding
s.
-
Constructor Details
-
InjectorBindings
-
InjectorBindings
@Inject public InjectorBindings(com.google.inject.Injector injector)
-
-
Method Details
-
findBindingPublisher
-
findRankingFunction
-
subscribe
Description copied from interface:BindingPublisher
Subscribes the givenBindingSubscriber
to receiveBinding
s.- Specified by:
subscribe
in interfaceBindingPublisher
- Parameters:
subscriber
- The subscriber
-
unsubscribe
Description copied from interface:BindingPublisher
Stops the givenBindingSubscriber
from receivingBinding
s.- Specified by:
unsubscribe
in interfaceBindingPublisher
- Parameters:
subscriber
- The subscriber
-
maxBindingRank
public int maxBindingRank()Description copied from interface:BindingPublisher
Estimates the maximum rank this publisher may assign to aBinding
.- Specified by:
maxBindingRank
in interfaceBindingPublisher
- Returns:
- Maximum binding rank
-
adapt
Description copied from interface:BindingPublisher
Attempts to adapt this publisher to the given type.- Specified by:
adapt
in interfaceBindingPublisher
- Parameters:
type
- The target type- Returns:
- Adapted instance;
null
if it couldn't be adapted
-
hashCode
public int hashCode() -
equals
-
toString
-