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 BindingPublisher
s.-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(com.google.inject.Injector injector, int rank) Deprecated.injectors are normally added automatically, clients should not need to call this methodboolean
add
(BindingPublisher publisher) Adds the given rankedBindingPublisher
and distributes itsBinding
s.void
clear()
Removes all knownBindingPublisher
s and theirBinding
s.Snapshot of currently registeredBindingPublisher
s.void
remove
(com.google.inject.Injector injector) Deprecated.boolean
remove
(BindingPublisher publisher) Removes the givenBindingPublisher
and itsBinding
s.Methods inherited from interface org.eclipse.sisu.inject.BeanLocator
locate, watch
-
Method Details
-
add
Adds the given rankedBindingPublisher
and distributes itsBinding
s.- Parameters:
publisher
- The new publisher- Returns:
true
if the publisher was added; otherwisefalse
-
remove
Removes the givenBindingPublisher
and itsBinding
s.- Parameters:
publisher
- The old publisher- Returns:
true
if the publisher was removed; otherwisefalse
-
publishers
Iterable<BindingPublisher> publishers()Snapshot of currently registeredBindingPublisher
s.- Returns:
- The registered
BindingPublisher
s
-
clear
void clear()Removes all knownBindingPublisher
s and theirBinding
s. -
add
Deprecated.injectors are normally added automatically, clients should not need to call this methodAdds the given rankedInjector
and distributes itsBinding
s. Marked as deprecated because most clients should not call this method; any injector with an instance binding to aBeanLocator
is 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 givenInjector
and itsBinding
s.- Parameters:
injector
- The old injector
-