|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.picocontainer.defaults.AbstractComponentAdapter
Base class for a ComponentAdapter with general functionality.
This implementation provides basic checks for a healthy implementation of a ComponentAdapter.
It does not allow to use null
for the component key or the implementation,
ensures that the implementation is a concrete class and that the key is assignable from the
implementation if the key represents a type.
Constructor Summary | |
protected |
AbstractComponentAdapter(Object componentKey,
Class componentImplementation)
Constructs a new ComponentAdapter for the given key and implementation. |
Method Summary | |
Class |
getComponentImplementation()
Retrieve the class of the component. |
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. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.picocontainer.ComponentAdapter |
getComponentInstance, verify |
Constructor Detail |
protected AbstractComponentAdapter(Object componentKey, Class componentImplementation) throws AssignabilityRegistrationException, NotConcreteRegistrationException
componentKey
- the search key for this implementationcomponentImplementation
- the concrete implementation
AssignabilityRegistrationException
- if the key is a type and the implementation cannot be assigned to.
NotConcreteRegistrationException
- if the implementation is not a concrete class.Method Detail |
public Object getComponentKey()
getComponentKey
in interface ComponentAdapter
ComponentAdapter.getComponentKey()
public Class getComponentImplementation()
getComponentImplementation
in interface ComponentAdapter
ComponentAdapter.getComponentImplementation()
public String toString()
Object.toString()
public PicoContainer getContainer()
ComponentAdapter
getContainer
in interface ComponentAdapter
ComponentAdapter.getContainer()
public void setContainer(PicoContainer picoContainer)
ComponentAdapter
setContainer
in interface ComponentAdapter
picoContainer
- the container in which this adapter is registered.ComponentAdapter.setContainer(org.picocontainer.PicoContainer)
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |