|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.objectledge.pico.customization.CustomizedComponentAdapter
public class CustomizedComponentAdapter
An adapter for a component that is customized on behalf of a component that is asking for it.
When another component is being initialized and it depends on the component that is managed by this adapter (identified by the componentKey), the customizedContainerProvider is asked to produce an instance of the customized component. Thus, different components may recieve different instnaces of the managed component, depending on the customizedComponentProvider's semantics.
| Field Summary | |
|---|---|
private Object |
componentKey
|
private CustomizedComponentProvider |
customizedComponentProvider
|
| Constructor Summary | |
|---|---|
CustomizedComponentAdapter(Object componentKey,
CustomizedComponentProvider customizedComponentProvider)
Crates a new instance of the adapter. |
|
| Method Summary | |
|---|---|
void |
accept(org.picocontainer.PicoVisitor visitor)
|
Class |
getComponentImplementation()
|
Object |
getComponentInstance(org.picocontainer.PicoContainer container)
|
Object |
getComponentInstance(org.picocontainer.PicoContainer container,
Object componentKey,
Class componentImplementation)
Returns a customized components instance. |
Object |
getComponentKey()
|
void |
verify(org.picocontainer.PicoContainer container)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Object componentKey
private CustomizedComponentProvider customizedComponentProvider
| Constructor Detail |
|---|
public CustomizedComponentAdapter(Object componentKey,
CustomizedComponentProvider customizedComponentProvider)
componentKey - the component key this adapter manages.customizedComponentProvider - a provider of customized components.| Method Detail |
|---|
public Object getComponentInstance(org.picocontainer.PicoContainer container)
throws org.picocontainer.PicoInitializationException,
org.picocontainer.PicoIntrospectionException
getComponentInstance in interface org.picocontainer.ComponentAdapterorg.picocontainer.PicoInitializationException
org.picocontainer.PicoIntrospectionException
public Object getComponentInstance(org.picocontainer.PicoContainer container,
Object componentKey,
Class componentImplementation)
throws org.picocontainer.PicoInitializationException,
org.picocontainer.PicoIntrospectionException,
UnsupportedKeyTypeException
This method is called by the CustomizingConstructorComponentAdapter.
container - the container for resolving references.componentKey - the key of the requesting component.componentImplementation - the implemenation class of the requesting component.
org.picocontainer.PicoInitializationException - if the customized component cannot be instantiated.
org.picocontainer.PicoIntrospectionException - if there is a problem introspecting classes.
UnsupportedKeyTypeException - if the requesting component key if an unsupported type.
public void verify(org.picocontainer.PicoContainer container)
throws org.picocontainer.PicoVerificationException
verify in interface org.picocontainer.ComponentAdapterorg.picocontainer.PicoVerificationExceptionpublic Class getComponentImplementation()
getComponentImplementation in interface org.picocontainer.ComponentAdapterpublic Object getComponentKey()
getComponentKey in interface org.picocontainer.ComponentAdapterpublic void accept(org.picocontainer.PicoVisitor visitor)
accept in interface org.picocontainer.ComponentAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||