|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sonatype.guice.bean.locators.DefaultBeanLocator
@Singleton public final class DefaultBeanLocator
Default MutableBeanLocator
that locates qualified beans across a dynamic group of BindingPublisher
s.
Constructor Summary | |
---|---|
DefaultBeanLocator()
|
Method Summary | |
---|---|
void |
add(BindingPublisher publisher,
int rank)
Adds the given ranked BindingPublisher and distributes its Binding s. |
void |
add(com.google.inject.Injector injector,
int rank)
Adds the given ranked Injector and distributes its Binding s. |
void |
clear()
Removes all known BindingPublisher s and their Binding s. |
Iterable<BeanEntry> |
locate(com.google.inject.Key key)
Finds bean implementations that match the given qualified binding Key . |
void |
remove(BindingPublisher publisher)
Removes the given BindingPublisher and its Binding s. |
void |
remove(com.google.inject.Injector injector)
Removes the given Injector and its Binding s. |
void |
watch(com.google.inject.Key key,
Mediator mediator,
Object watcher)
Tracks bean implementations that match the given qualified binding Key . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultBeanLocator()
Method Detail |
---|
public Iterable<BeanEntry> locate(com.google.inject.Key key)
BeanLocator
Key
.
locate
in interface BeanLocator
key
- The qualified key
public void watch(com.google.inject.Key key, Mediator mediator, Object watcher)
BeanLocator
Key
. Mediator
pattern to send events to an arbitrary watcher object.
watch
in interface BeanLocator
key
- The qualified keymediator
- The event mediatorwatcher
- The bean watcherpublic void add(com.google.inject.Injector injector, int rank)
MutableBeanLocator
Injector
and distributes its Binding
s. Marked as deprecated because most
clients should not call this method; any injector that contains a binding to the BeanLocator
is
automatically added to that locator as part of the bootstrapping process.
add
in interface MutableBeanLocator
injector
- The new injectorrank
- The assigned rankpublic void remove(com.google.inject.Injector injector)
MutableBeanLocator
Injector
and its Binding
s.
remove
in interface MutableBeanLocator
injector
- The old injectorpublic void add(BindingPublisher publisher, int rank)
BindingDistributor
BindingPublisher
and distributes its Binding
s.
add
in interface BindingDistributor
publisher
- The new publisherrank
- The assigned rankpublic void remove(BindingPublisher publisher)
BindingDistributor
BindingPublisher
and its Binding
s.
remove
in interface BindingDistributor
publisher
- The old publisherpublic void clear()
BindingDistributor
BindingPublisher
s and their Binding
s.
clear
in interface BindingDistributor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |