|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.picocontainer.containers.AbstractDelegatingPicoContainer
public abstract class AbstractDelegatingPicoContainer
abstract base class for immutable delegation to pico
| Constructor Summary | |
|---|---|
AbstractDelegatingPicoContainer(PicoContainer delegate)
|
|
| Method Summary | ||
|---|---|---|
void |
accept(PicoVisitor visitor)
Accepts a visitor that should visit the child containers, component adapters and component instances. |
|
boolean |
equals(Object obj)
|
|
|
getComponent(Class<T> componentType)
Retrieve a component keyed by the component type. |
|
|
getComponent(Class<T> componentType,
Class<? extends Annotation> binding)
|
|
Object |
getComponent(Object componentKeyOrType)
Retrieve a component instance registered with a specific key or type. |
|
Object |
getComponent(Object componentKeyOrType,
Type into)
|
|
|
getComponentAdapter(Class<T> componentType,
Class<? extends Annotation> binding)
|
|
|
getComponentAdapter(Class<T> componentType,
NameBinding componentNameBinding)
Find a component adapter associated with the specified type. |
|
ComponentAdapter<?> |
getComponentAdapter(Object componentKey)
Find a component adapter associated with the specified key. |
|
Collection<ComponentAdapter<?>> |
getComponentAdapters()
Retrieve all the component adapters inside this container. |
|
|
getComponentAdapters(Class<T> componentType)
Retrieve all component adapters inside this container that are associated with the specified type. |
|
|
getComponentAdapters(Class<T> componentType,
Class<? extends Annotation> binding)
|
|
List<Object> |
getComponents()
Retrieve all the registered component instances in the container, (not including those in the parent container). |
|
|
getComponents(Class<T> type)
Returns a List of components of a certain componentType. |
|
PicoContainer |
getDelegate()
|
|
PicoContainer |
getParent()
Retrieve the parent container of this container. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractDelegatingPicoContainer(PicoContainer delegate)
| Method Detail |
|---|
public final void accept(PicoVisitor visitor)
PicoContainer
accept in interface PicoContainervisitor - the visitorpublic boolean equals(Object obj)
equals in class Objectpublic <T> T getComponent(Class<T> componentType)
PicoContainer
getComponent in interface PicoContainerT - the type of the component.componentType - the type of the component
public <T> T getComponent(Class<T> componentType,
Class<? extends Annotation> binding)
getComponent in interface PicoContainerpublic Object getComponent(Object componentKeyOrType)
PicoContainer
getComponent in interface PicoContainercomponentKeyOrType - the key or Type that the component was registered with.
null if no component has been registered for the specified
key.
public Object getComponent(Object componentKeyOrType,
Type into)
getComponent in interface PicoContainer
public <T> ComponentAdapter<T> getComponentAdapter(Class<T> componentType,
NameBinding componentNameBinding)
PicoContainer
getComponentAdapter in interface PicoContainercomponentType - the type of the component.
null if no component has been
registered for the specified key.
public <T> ComponentAdapter<T> getComponentAdapter(Class<T> componentType,
Class<? extends Annotation> binding)
getComponentAdapter in interface PicoContainerpublic ComponentAdapter<?> getComponentAdapter(Object componentKey)
PicoContainer
getComponentAdapter in interface PicoContainercomponentKey - the key that the component was registered with.
null if no component has been
registered for the specified key.public Collection<ComponentAdapter<?>> getComponentAdapters()
PicoContainer
getComponentAdapters in interface PicoContainerComponentAdapters inside this container. The collection will not
be modifiable.a variant of this method which returns the component adapters inside this
container that are associated with the specified type.public <T> List<ComponentAdapter<T>> getComponentAdapters(Class<T> componentType)
PicoContainer
getComponentAdapters in interface PicoContainercomponentType - the type of the components.
ComponentAdapters inside this container that are associated with
the specified type. Changes to this collection will not be reflected in the container itself.
public <T> List<ComponentAdapter<T>> getComponentAdapters(Class<T> componentType,
Class<? extends Annotation> binding)
getComponentAdapters in interface PicoContainerpublic List<Object> getComponents()
PicoContainer
getComponents in interface PicoContainer
public <T> List<T> getComponents(Class<T> type)
throws PicoException
PicoContainer
getComponents in interface PicoContainertype - the searched type.
PicoException - if the instantiation of a component failspublic PicoContainer getDelegate()
public PicoContainer getParent()
PicoContainer
getParent in interface PicoContainerPicoContainer instance, or null if this container does not have a parent.public String toString()
toString in class Object
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||