public final class

DefaultBeanLocator

extends ReentrantLock
implements MutableBeanLocator
java.lang.Object
   ↳ java.util.concurrent.locks.ReentrantLock
     ↳ org.eclipse.sisu.inject.DefaultBeanLocator

Class Overview

Default MutableBeanLocator that locates qualified beans across a dynamic group of BindingPublishers.

Summary

Public Constructors
DefaultBeanLocator()
Public Methods
void add(Injector injector, int rank)
Adds the given ranked Injector and distributes its Bindings.
void add(BindingPublisher publisher, int rank)
Adds the given ranked BindingPublisher and distributes its Bindings.
void clear()
Removes all known BindingPublishers and their Bindings.
Iterable<BeanEntry> locate(Key key)
void remove(BindingPublisher publisher)
Removes the given BindingPublisher and its Bindings.
void remove(Injector injector)
Removes the given Injector and its Bindings.
void watch(Key key, Mediator mediator, Object watcher)
[Expand]
Inherited Methods
From class java.util.concurrent.locks.ReentrantLock
From class java.lang.Object
From interface java.util.concurrent.locks.Lock
From interface org.eclipse.sisu.inject.BeanLocator
From interface org.eclipse.sisu.inject.MutableBeanLocator

Public Constructors

public DefaultBeanLocator ()

Public Methods

public void add (Injector injector, int rank)

Adds the given ranked Injector and distributes its Bindings. 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.

Parameters
injector The new injector
rank The assigned rank

public void add (BindingPublisher publisher, int rank)

Adds the given ranked BindingPublisher and distributes its Bindings.

Parameters
publisher The new publisher
rank The assigned rank

public void clear ()

Removes all known BindingPublishers and their Bindings.

public Iterable<BeanEntry> locate (Key key)

public void remove (BindingPublisher publisher)

Removes the given BindingPublisher and its Bindings.

Parameters
publisher The old publisher

public void remove (Injector injector)

Removes the given Injector and its Bindings.

Parameters
injector The old injector

public void watch (Key key, Mediator mediator, Object watcher)