public class CompositePicoContainer extends Object implements PicoContainer, Converting, Serializable
| Modifier and Type | Class and Description |
|---|---|
class |
CompositePicoContainer.CompositeConverters |
| Constructor and Description |
|---|
CompositePicoContainer(PicoContainer... containers) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(PicoVisitor visitor)
Accepts a visitor that should visit the child containers, component adapters and component instances.
|
<T> T |
getComponent(Class<T> componentType)
Retrieve a component keyed by the component type.
|
<T> T |
getComponent(Class<T> componentType,
Class<? extends Annotation> binding)
Retrieve a component keyed by the component type and binding type.
|
Object |
getComponent(Object componentKeyOrType)
Retrieve a component instance registered with a specific key or type.
|
Object |
getComponent(Object componentKeyOrType,
Type into) |
<T> ComponentAdapter<T> |
getComponentAdapter(Class<T> componentType,
Class<? extends Annotation> binding)
Find a component adapter associated with the specified type and binding type.
|
<T> ComponentAdapter<T> |
getComponentAdapter(Class<T> componentType,
NameBinding nameBinding)
Find a component adapter associated with the specified type and binding name.
|
ComponentAdapter |
getComponentAdapter(Object componentKey)
Find a component adapter associated with the specified key.
|
Collection<ComponentAdapter<?>> |
getComponentAdapters()
Retrieve all the component adapters inside this container.
|
<T> List<ComponentAdapter<T>> |
getComponentAdapters(Class<T> componentType)
Retrieve all component adapters inside this container that are associated with the specified type.
|
<T> List<ComponentAdapter<T>> |
getComponentAdapters(Class<T> componentType,
Class<? extends Annotation> binding)
Retrieve all component adapters inside this container that are associated with the specified type and binding type.
|
List<Object> |
getComponents()
Retrieve all the registered component instances in the container, (not including those in the parent container).
|
<T> List<T> |
getComponents(Class<T> componentType)
Returns a List of components of a certain componentType.
|
Converters |
getConverters()
Retrieve the set of converters for transforming string parameters
into objects.
|
PicoContainer |
getParent()
Retrieve the parent container of this container.
|
public CompositePicoContainer(PicoContainer... containers)
public <T> T getComponent(Class<T> componentType)
PicoContainergetComponent in interface PicoContainercomponentType - the type of the componentpublic Object getComponent(Object componentKeyOrType, Type into)
getComponent in interface PicoContainerpublic Object getComponent(Object componentKeyOrType)
PicoContainergetComponent 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 ComponentAdapter getComponentAdapter(Object componentKey)
PicoContainergetComponentAdapter in interface PicoContainercomponentKey - the key that the component was registered with.null if no component has been
registered for the specified key.public <T> ComponentAdapter<T> getComponentAdapter(Class<T> componentType, NameBinding nameBinding)
PicoContainergetComponentAdapter in interface PicoContainercomponentType - the type of the component.nameBinding - the name binding to usenull if no component has been
registered for the specified key.public <T> ComponentAdapter<T> getComponentAdapter(Class<T> componentType, Class<? extends Annotation> binding)
PicoContainergetComponentAdapter in interface PicoContainercomponentType - the type of the component.binding - the typed binding to usenull if no component has been
registered for the specified key.public <T> T getComponent(Class<T> componentType, Class<? extends Annotation> binding)
PicoContainergetComponent in interface PicoContainercomponentType - the type of the componentbinding - the binding type of the componentpublic List<Object> getComponents()
PicoContainergetComponents in interface PicoContainerpublic PicoContainer getParent()
PicoContainergetParent in interface PicoContainerPicoContainer instance, or null if this container does not have a parent.public Collection<ComponentAdapter<?>> getComponentAdapters()
PicoContainergetComponentAdapters 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)
PicoContainergetComponentAdapters 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)
PicoContainergetComponentAdapters in interface PicoContainercomponentType - the type of the components.binding - the typed binding to useComponentAdapters 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<T> getComponents(Class<T> componentType)
PicoContainergetComponents in interface PicoContainercomponentType - the searched type.public void accept(PicoVisitor visitor)
PicoContaineraccept in interface PicoContainervisitor - the visitorpublic Converters getConverters()
ConvertinggetConverters in interface ConvertingCopyright © 2003-2014 Codehaus. All Rights Reserved.