|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the core interface for PicoContainer. It only has accessor methods.
In order to register components in a PicoContainer, use a MutablePicoContainer
,
such as DefaultPicoContainer
.
Method Summary | |
void |
addOrderedComponentAdapter(ComponentAdapter componentAdapter)
Callback method from the implementation to keep track of the instantiation order. |
ComponentAdapter |
getComponentAdapter(java.lang.Object componentKey)
Finds a ComponentAdapter matching the key, looking in parent if not found in self (unless parent is null). |
ComponentAdapter |
getComponentAdapterOfType(java.lang.Class componentType)
Finds a ComponentAdapter matching the type, looking in parent if not found in self (unless parent is null). |
java.util.Collection |
getComponentAdapters()
Returns all adapters (not including the adapters from the parent). |
java.lang.Object |
getComponentInstance(java.lang.Object componentKey)
Gets a component instance registered with a specific key. |
java.lang.Object |
getComponentInstanceOfType(java.lang.Class componentType)
Finds a component instance matching the type, looking in parent if not found in self (unless parent is null). |
java.util.List |
getComponentInstances()
Gets all the registered component instances in the container, (not including those in the parent container). |
PicoContainer |
getParent()
Get the parent container of this container. |
void |
verify()
Verifies that the dependencies for all the registered components can be satisfied None of the components are instantiated during the verification process. |
Methods inherited from interface org.picocontainer.Startable |
start, stop |
Methods inherited from interface org.picocontainer.Disposable |
dispose |
Method Detail |
public java.lang.Object getComponentInstance(java.lang.Object componentKey)
componentKey
- key the component was registered with.
public java.lang.Object getComponentInstanceOfType(java.lang.Class componentType)
componentType
- type of the component.
public java.util.List getComponentInstances()
public PicoContainer getParent()
PicoContainer
.public ComponentAdapter getComponentAdapter(java.lang.Object componentKey)
componentKey
- key of the component.
public ComponentAdapter getComponentAdapterOfType(java.lang.Class componentType)
componentType
- type of the component.
public java.util.Collection getComponentAdapters()
ComponentAdapter
.public void verify() throws PicoVerificationException
PicoVerificationException
- if there are unsatisifiable dependencies.public void addOrderedComponentAdapter(ComponentAdapter componentAdapter)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |