|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the core interface for registration of components.
Method Summary | |
void |
registerComponent(ComponentAdapter componentAdapter)
Registers a component via a ComponentAdapter. |
ComponentAdapter |
registerComponentImplementation(java.lang.Class componentImplementation)
Registers a component using the componentImplementation as key. |
ComponentAdapter |
registerComponentImplementation(java.lang.Object componentKey,
java.lang.Class componentImplementation)
Registers a component. |
ComponentAdapter |
registerComponentImplementation(java.lang.Object componentKey,
java.lang.Class componentImplementation,
Parameter[] parameters)
Registers a component. |
ComponentAdapter |
registerComponentInstance(java.lang.Object componentInstance)
Registers an arbitrary object, using its class as a key. |
ComponentAdapter |
registerComponentInstance(java.lang.Object componentKey,
java.lang.Object componentInstance)
Registers an arbitrary object as a compoent in the container. |
void |
setParent(PicoContainer parent)
Deprecated. This will probably go away. implementations should take the parent in the constructor (constructor injection!) |
ComponentAdapter |
unregisterComponent(java.lang.Object componentKey)
Unregisters a component by key. |
ComponentAdapter |
unregisterComponentByInstance(java.lang.Object componentInstance)
Unregisters a component by instance. |
Methods inherited from interface org.picocontainer.PicoContainer |
addOrderedComponentAdapter, getComponentAdapter, getComponentAdapterOfType, getComponentAdapters, getComponentInstance, getComponentInstanceOfType, getComponentInstances, getParent, verify |
Methods inherited from interface org.picocontainer.Startable |
start, stop |
Methods inherited from interface org.picocontainer.Disposable |
dispose |
Method Detail |
public ComponentAdapter registerComponentImplementation(java.lang.Object componentKey, java.lang.Class componentImplementation) throws PicoRegistrationException
componentKey
- a key that identifies the compoent. Must be unique within the conainer.
The type of the key object has no semantic significance unless explicitly specified
in the implementing container.componentImplementation
- the concrete component class.
PicoRegistrationException
- if registration fails.public ComponentAdapter registerComponentImplementation(java.lang.Object componentKey, java.lang.Class componentImplementation, Parameter[] parameters) throws PicoRegistrationException
componentKey
- a key that identifies the compoent. Must be unique within the conainer.
The type of the key object has no semantic significance unless explicitly specified
in the implementing container.componentImplementation
- the concrete component class.parameters
- an array of parameters that gives the container hints about what arguments
to pass to the constructor when it is instantiated.
PicoRegistrationException
- if registration fails.public ComponentAdapter registerComponentImplementation(java.lang.Class componentImplementation) throws PicoRegistrationException
componentImplementation
- the concrete component class.
PicoRegistrationException
- if registration fails.public ComponentAdapter registerComponentInstance(java.lang.Object componentInstance) throws PicoRegistrationException
componentInstance
-
PicoRegistrationException
- if registration fails.public ComponentAdapter registerComponentInstance(java.lang.Object componentKey, java.lang.Object componentInstance) throws PicoRegistrationException
componentKey
- a key that identifies the compoent. Must be unique within the conainer.
The type of the key object has no semantic significance unless explicitly specified
in the implementing container.componentInstance
- an arbitrary object.
PicoRegistrationException
- if registration fails.public void registerComponent(ComponentAdapter componentAdapter) throws PicoRegistrationException
componentAdapter
- the adapter
PicoRegistrationException
- if registration fails.public ComponentAdapter unregisterComponent(java.lang.Object componentKey)
componentKey
- key of the component to unregister.
public ComponentAdapter unregisterComponentByInstance(java.lang.Object componentInstance)
componentInstance
- the component instance to unregister.
public void setParent(PicoContainer parent)
parent
- parent container.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |