public class EmptyPicoContainer extends java.lang.Object implements PicoContainer, java.io.Serializable
| Constructor and Description |
|---|
EmptyPicoContainer() |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(PicoVisitor visitor)
Accepts a visitor that should visit the child containers, component adapters and component instances.
|
void |
dispose()
Dispose this component.
|
ComponentAdapter |
getComponentAdapter(java.lang.Object componentKey)
Find a component adapter associated with the specified key.
|
ComponentAdapter |
getComponentAdapterOfType(java.lang.Class componentType)
Find a component adapter associated with the specified type.
|
java.util.Collection |
getComponentAdapters()
Retrieve all the component adapters inside this container.
|
java.util.List |
getComponentAdaptersOfType(java.lang.Class componentType)
Retrieve all component adapters inside this container that are associated with the specified type.
|
java.lang.Object |
getComponentInstance(java.lang.Object componentKey)
Retrieve a component instance registered with a specific key.
|
java.lang.Object |
getComponentInstanceOfType(java.lang.Class componentType)
Find a component instance matching the specified type.
|
java.util.List |
getComponentInstances()
Retrieve all the registered component instances in the container, (not including those in the parent container).
|
java.util.List |
getComponentInstancesOfType(java.lang.Class componentType)
Returns a List of components of a certain componentType.
|
PicoContainer |
getParent()
Retrieve the parent container of this container.
|
void |
start()
Start this component.
|
void |
stop()
Stop this component.
|
void |
verify()
Verify that the dependencies for all the registered components can be satisfied.
|
public java.lang.Object getComponentInstance(java.lang.Object componentKey)
PicoContainergetComponentInstance in interface PicoContainercomponentKey - the key that the component was registered with.null if no component has been registered for the specified
key.public java.lang.Object getComponentInstanceOfType(java.lang.Class componentType)
PicoContainergetComponentInstanceOfType in interface PicoContainercomponentType - the type of the componentnull if no component has been registered
with a matching typepublic java.util.List getComponentInstances()
PicoContainergetComponentInstances in interface PicoContainerpublic PicoContainer getParent()
PicoContainergetParent in interface PicoContainerPicoContainer instance, or null if this container does not have a parent.public ComponentAdapter getComponentAdapter(java.lang.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 ComponentAdapter getComponentAdapterOfType(java.lang.Class componentType)
PicoContainergetComponentAdapterOfType in interface PicoContainercomponentType - the type of the component.null if no component has been
registered for the specified key.public java.util.Collection 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 java.util.List getComponentAdaptersOfType(java.lang.Class componentType)
PicoContainergetComponentAdaptersOfType 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 void verify()
PicoContainerverify in interface PicoContainerpublic void accept(PicoVisitor visitor)
PicoContaineraccept in interface PicoContainervisitor - the visitorpublic java.util.List getComponentInstancesOfType(java.lang.Class componentType)
PicoContainergetComponentInstancesOfType in interface PicoContainercomponentType - the searched type.public void start()
Startablepublic void stop()
StartableDisposable if you need a single call at the definite end of the lifecycle.public void dispose()
Disposabledispose in interface Disposable