org.picocontainer
public interface ComponentAdapter
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.
Since: 1.0
Method Summary | |
---|---|
void | accept(PicoVisitor visitor)
Accepts a visitor for this ComponentAdapter. |
Class | getComponentImplementation()
Retrieve the class of the component.
|
Object | getComponentInstance(PicoContainer container)
Retrieve the component instance. |
Object | getComponentKey()
Retrieve the key associated with the component.
|
void | verify(PicoContainer container)
Verify that all dependencies for this adapter can be satisifed. |
Parameters: visitor the visitor.
Since: 1.1
Returns: the component's implementation class. Should normally be a concrete class (ie, a class that can be instantiated).
Parameters: container the PicoContainer, that is used to resolve any possible dependencies of the instance.
Returns: the component instance.
Throws: 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.
Returns: the component's key. Should either be a class type (normally an interface) or an identifier that is unique (within the scope of the current PicoContainer).
Parameters: container the PicoContainer, that is used to resolve any possible dependencies of the instance.
Throws: PicoIntrospectionException if one or more dependencies cannot be resolved.