|
|||||||||||
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(Class componentImplementation)
Registers a component using the componentImplementation as key. |
ComponentAdapter |
registerComponentImplementation(Object componentKey,
Class componentImplementation)
Registers a component. |
ComponentAdapter |
registerComponentImplementation(Object componentKey,
Class componentImplementation,
Parameter[] parameters)
Registers a component. |
ComponentAdapter |
registerComponentInstance(Object componentInstance)
Registers an arbitrary object, using itself as a key. |
ComponentAdapter |
registerComponentInstance(Object componentKey,
Object componentInstance)
Registers an arbitrary object as a compoent in the container. |
void |
setParent(PicoContainer parent)
Sets the Parent container. |
ComponentAdapter |
unregisterComponent(Object componentKey)
Unregisters a component. |
Methods inherited from interface org.picocontainer.PicoContainer |
addOrderedComponentAdapter, getComponentAdapter, getComponentAdapterOfType, getComponentAdapters, getComponentInstance, getComponentInstanceOfType, getComponentInstances, getComponentKeys, getParent, hasComponent, verify |
Methods inherited from interface org.picocontainer.lifecycle.Startable |
start |
Methods inherited from interface org.picocontainer.lifecycle.Stoppable |
stop |
Methods inherited from interface org.picocontainer.lifecycle.Disposable |
dispose |
Method Detail |
public ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation) throws PicoRegistrationException
componentKey
- a key that identifies the compoent. Must be unique within the conainer.componentImplementation
- the concrete component class.
PicoRegistrationException
- if registration fails.public ComponentAdapter registerComponentImplementation(Object componentKey, Class componentImplementation, Parameter[] parameters) throws PicoRegistrationException
componentKey
- a key that identifies the compoent. Must be unique within the conainer.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(Class componentImplementation) throws PicoRegistrationException
componentImplementation
- the concrete component class.
PicoRegistrationException
- if registration fails.public ComponentAdapter registerComponentInstance(Object componentInstance) throws PicoRegistrationException
componentInstance
-
PicoRegistrationException
- if registration fails.public ComponentAdapter registerComponentInstance(Object componentKey, Object componentInstance) throws PicoRegistrationException
componentKey
- a key that identifies the compoent. Must be unique within the conainer.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(Object componentKey)
componentKey
- key of the component 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 |