Package org.eclipse.sisu.inject
Interface MutableBeanLocator
- All Superinterfaces:
BeanLocator
- All Known Implementing Classes:
DefaultBeanLocator
Mutable
BeanLocator that finds and tracks bindings across zero or more BindingPublishers.-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(com.google.inject.Injector injector, int rank) Deprecated.injectors are normally added automatically, clients should not need to call this methodbooleanadd(BindingPublisher publisher) Adds the given rankedBindingPublisherand distributes itsBindings.voidclear()Removes all knownBindingPublishers and theirBindings.Snapshot of currently registeredBindingPublishers.voidremove(com.google.inject.Injector injector) Deprecated.booleanremove(BindingPublisher publisher) Removes the givenBindingPublisherand itsBindings.Methods inherited from interface org.eclipse.sisu.inject.BeanLocator
locate, watch
-
Method Details
-
add
Adds the given rankedBindingPublisherand distributes itsBindings.- Parameters:
publisher- The new publisher- Returns:
trueif the publisher was added; otherwisefalse
-
remove
Removes the givenBindingPublisherand itsBindings.- Parameters:
publisher- The old publisher- Returns:
trueif the publisher was removed; otherwisefalse
-
publishers
Iterable<BindingPublisher> publishers()Snapshot of currently registeredBindingPublishers.- Returns:
- The registered
BindingPublishers
-
clear
void clear()Removes all knownBindingPublishers and theirBindings. -
add
Deprecated.injectors are normally added automatically, clients should not need to call this methodAdds the given rankedInjectorand distributes itsBindings. Marked as deprecated because most clients should not call this method; any injector with an instance binding to aBeanLocatoris automatically added to that locator as part of the bootstrapping process.- Parameters:
injector- The new injectorrank- The assigned rank; should reflect the injector'sRankingFunction.maxRank()
-
remove
Deprecated.Removes the givenInjectorand itsBindings.- Parameters:
injector- The old injector
-