public abstract class AbstractComponentAdapter extends MonitoringComponentAdapter
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.| Modifier and Type | Field and Description |
|---|---|
private java.lang.Class |
componentImplementation |
private java.lang.Object |
componentKey |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractComponentAdapter(java.lang.Object componentKey,
java.lang.Class componentImplementation)
Constructs a new ComponentAdapter for the given key and implementation.
|
protected |
AbstractComponentAdapter(java.lang.Object componentKey,
java.lang.Class componentImplementation,
ComponentMonitor monitor)
Constructs a new ComponentAdapter for the given key and implementation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(PicoVisitor visitor)
Accepts a visitor for this ComponentAdapter.
|
protected void |
checkTypeCompatibility() |
java.lang.Class |
getComponentImplementation()
Retrieve the class of the component.
|
java.lang.Object |
getComponentKey()
Retrieve the key associated with the component.
|
java.lang.String |
toString() |
changeMonitor, currentMonitorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetComponentInstance, verifyprivate java.lang.Object componentKey
private java.lang.Class componentImplementation
protected AbstractComponentAdapter(java.lang.Object componentKey,
java.lang.Class componentImplementation)
throws AssignabilityRegistrationException
componentKey - the search key for this implementationcomponentImplementation - the concrete implementationAssignabilityRegistrationException - if the key is a type and the implementation cannot be assigned to.protected AbstractComponentAdapter(java.lang.Object componentKey,
java.lang.Class componentImplementation,
ComponentMonitor monitor)
throws AssignabilityRegistrationException
componentKey - the search key for this implementationcomponentImplementation - the concrete implementationmonitor - the component monitor used by this ComponentAdapterAssignabilityRegistrationException - if the key is a type and the implementation cannot be assigned to.public java.lang.Object getComponentKey()
ComponentAdapter.getComponentKey()public java.lang.Class getComponentImplementation()
ComponentAdapter.getComponentImplementation()protected void checkTypeCompatibility()
throws AssignabilityRegistrationException
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public void accept(PicoVisitor visitor)
ComponentAdapterPicoContainer, that
cascades the visitor also down to all its ComponentAdapter instances.visitor - the visitor.