|
|||||||||||
| 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 |
addChild(MutablePicoContainer child)
Adds a Child container. |
void |
addOrderedComponentAdapter(ComponentAdapter componentAdapter)
Adds a component instance to the container. |
void |
addParent(MutablePicoContainer parent)
Adds a Parent container. |
Object |
registerComponentImplementation(Class componentImplementation)
Registers a component using the componentImplementation as key. |
Object |
registerComponentImplementation(Object componentKey,
Class componentImplementation)
Registers a component. |
Object |
registerComponentImplementation(Object componentKey,
Class componentImplementation,
Parameter[] parameters)
Registers a component. |
Object |
registerComponentInstance(Object componentInstance)
Registers an arbitrary object, using itself as a key. |
Object |
registerComponentInstance(Object componentKey,
Object componentInstance)
Registers an arbitrary object as a compoent in the container. |
Object |
unregisterComponent(Object componentKey)
Unregisters a component. |
| Methods inherited from interface org.picocontainer.PicoContainer |
findComponentAdapter, getChildContainers, getComponentInstance, getComponentInstances, getComponentKeys, getComponentMulticaster, getComponentMulticaster, getParentContainers, hasComponent |
| Method Detail |
public Object 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 Object 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 Object registerComponentImplementation(Class componentImplementation)
throws PicoRegistrationException
componentImplementation - the concrete component class.
PicoRegistrationException - if registration fails.
public Object registerComponentInstance(Object componentInstance)
throws PicoRegistrationException
componentInstance -
PicoRegistrationException
public Object 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 Object unregisterComponent(Object componentKey)
componentKey - key of the component to unregister.
public void addOrderedComponentAdapter(ComponentAdapter componentAdapter)
registerComponentInstance(java.lang.Object)
instead if you wish to register externally instantiated objects.
componentAdapter - key of the component.public void addChild(MutablePicoContainer child)
addParent(org.picocontainer.MutablePicoContainer) is not necessary.
child - child container.public void addParent(MutablePicoContainer parent)
addChild(org.picocontainer.MutablePicoContainer) is not necessary.
parent - parent container.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||