|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A component adapter is responsible for providing a specific component instance. An instance of an implementation of
this interface is used inside a PicoContainer
for every registered component or instance. Each
ComponentAdapter
instance has to have a key which is unique within that container. The key itself is
either a class type (normally an interface) or an identifier.
an extension of the PicoContainer interface which allows you to modify the contents of the
container.
Method Summary | |
Class |
getComponentImplementation()
Retrieve the class of the component. |
Object |
getComponentInstance()
Retrieve the component instance. |
Object |
getComponentKey()
Retrieve the key associated with the component. |
PicoContainer |
getContainer()
Retrieve the container in which the component is registered. |
void |
setContainer(PicoContainer picoContainer)
Set the container in which this adapter is registered. |
void |
verify()
Verify that all dependencies for this adapter can be satisifed. |
Method Detail |
public Object getComponentKey()
public Class getComponentImplementation()
public Object getComponentInstance() throws PicoInitializationException, PicoIntrospectionException
CachingComponentAdapter
will always return the
same instance.
PicoInitializationException
- if the component could not be instantiated.
PicoIntrospectionException
- if the component has dependencies which could not be resolved, or
instantiation of the component lead to an ambigous situation within the
container.public PicoContainer getContainer()
public void setContainer(PicoContainer picoContainer)
picoContainer
- the container in which this adapter is registered.public void verify() throws PicoVerificationException
PicoVerificationException
- if one or more dependencies cannot be resolved.
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |