|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ComponentAdapter
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 | |
---|---|
void |
accept(PicoVisitor visitor)
Accepts a visitor for this ComponentAdapter. |
java.lang.Class |
getComponentImplementation()
Retrieve the class of the component. |
java.lang.Object |
getComponentInstance(PicoContainer container)
Retrieve the component instance. |
java.lang.Object |
getComponentKey()
Retrieve the key associated with the component. |
void |
verify(PicoContainer container)
Verify that all dependencies for this adapter can be satisifed. |
Method Detail |
---|
java.lang.Object getComponentKey()
java.lang.Class getComponentImplementation()
java.lang.Object getComponentInstance(PicoContainer container) throws PicoInitializationException, PicoIntrospectionException
CachingComponentAdapter
will always return the
same instance.
container
- the PicoContainer
, that is used to resolve any possible dependencies of the 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.void verify(PicoContainer container) throws PicoIntrospectionException
container
- the PicoContainer
, that is used to resolve any possible dependencies of the instance.
PicoIntrospectionException
- if one or more dependencies cannot be resolved.void accept(PicoVisitor visitor)
PicoContainer
, that
cascades the visitor also down to all its ComponentAdapter instances.
visitor
- the visitor.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |