|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.picocontainer.extras.CompositePicoContainer
CompositePicoContainer aggregates the the contents of more than one internals together for the sake of a single list of components. This list may be used as the parent internals for another PicoContainer. This will result in directive graphs of containers/components rather than just trees. It is not in itself, a Pico component (the array in the constructor puts paid to that).
Nested Class Summary | |
static class |
CompositePicoContainer.Default
|
static class |
CompositePicoContainer.WithContainerArray
|
Constructor Summary | |
CompositePicoContainer(ComponentRegistry componentRegistry,
PicoContainer[] containers)
|
Method Summary | |
protected void |
addContainer(PicoContainer container)
Adds a new Pico internals to this composite internals |
Object |
getComponent(Object componentKey)
Get a component for a component type. |
Collection |
getComponentKeys()
Get all component types (random order). |
Object |
getComponentMulticaster()
Shorthand for getComponentMulticaster(boolean, boolean) (true, true). |
Object |
getComponentMulticaster(boolean callInInstantiationOrder,
boolean callUnmanagedComponents)
Returns a proxy that implements the union of all the components' interfaces. |
Collection |
getComponents()
Get all components (random order). |
boolean |
hasComponent(Object componentKey)
Does the internals have a partilcilar component type? |
void |
instantiateComponents()
Initialize the internals. |
protected void |
removeContainer(PicoContainer container)
Removes a Pico internals from this composite internals |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CompositePicoContainer(ComponentRegistry componentRegistry, PicoContainer[] containers)
Method Detail |
public Object getComponent(Object componentKey)
PicoContainer
getComponent
in interface PicoContainer
componentKey
- The component type to look for.
public Collection getComponentKeys()
PicoContainer
getComponentKeys
in interface PicoContainer
public void instantiateComponents()
PicoContainer
instantiateComponents
in interface PicoContainer
public boolean hasComponent(Object componentKey)
PicoContainer
hasComponent
in interface PicoContainer
componentKey
- The component type to look for.
public Collection getComponents()
PicoContainer
getComponents
in interface PicoContainer
public Object getComponentMulticaster()
PicoContainer
PicoContainer.getComponentMulticaster(boolean, boolean)
(true, true).
getComponentMulticaster
in interface PicoContainer
public Object getComponentMulticaster(boolean callInInstantiationOrder, boolean callUnmanagedComponents)
PicoContainer
getComponentMulticaster
in interface PicoContainer
callInInstantiationOrder
- whether to call the methods in the order of instantiation (true) or reverse (false)callUnmanagedComponents
- whether to exclude components registered via instance rather than classprotected void addContainer(PicoContainer container)
container
- protected void removeContainer(PicoContainer container)
container
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |