org.picocontainer.extras
Class DecoratingComponentAdapter

java.lang.Object
  extended byorg.picocontainer.extras.DecoratingComponentAdapter
All Implemented Interfaces:
ComponentAdapter, Serializable
Direct Known Subclasses:
CachingComponentAdapter, ImplementationHidingComponentAdapter, InvokingComponentAdapterFactory.Adapter, SynchronizedComponentAdapter

public class DecoratingComponentAdapter
extends Object
implements ComponentAdapter, Serializable

Version:
$Revision: 1.14 $
Author:
Jon Tirsen (tirsen@codehaus.org), Aslak Hellesoy
See Also:
Serialized Form

Constructor Summary
DecoratingComponentAdapter(ComponentAdapter delegate)
           
 
Method Summary
 Class getComponentImplementation()
           
 Object getComponentInstance()
          Gets the component instance.
 Object getComponentKey()
           
 PicoContainer getContainer()
           
 ComponentAdapter getDelegate()
           
 void setContainer(PicoContainer picoContainer)
          Sets the container in which this instance is registered, called by the container upon registration.
 void verify()
          Verify that all dependencies for this adapter can be satisifed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecoratingComponentAdapter

public DecoratingComponentAdapter(ComponentAdapter delegate)
Method Detail

getComponentKey

public Object getComponentKey()
Specified by:
getComponentKey in interface ComponentAdapter
Returns:
the component's key.

getComponentImplementation

public Class getComponentImplementation()
Specified by:
getComponentImplementation in interface ComponentAdapter
Returns:
the component's implementation class.

getComponentInstance

public Object getComponentInstance()
                            throws PicoInitializationException,
                                   PicoIntrospectionException,
                                   AssignabilityRegistrationException,
                                   NotConcreteRegistrationException
Description copied from interface: ComponentAdapter
Gets the component instance. This method will usually create a new instance for each call (an exception is CachingComponentAdapter).

Specified by:
getComponentInstance in interface ComponentAdapter
Returns:
the component instance.
Throws:
PicoInitializationException - if the component couldn't be instantiated
PicoIntrospectionException
AssignabilityRegistrationException
NotConcreteRegistrationException

verify

public void verify()
Description copied from interface: ComponentAdapter
Verify that all dependencies for this adapter can be satisifed.

Specified by:
verify in interface ComponentAdapter

getContainer

public PicoContainer getContainer()
Specified by:
getContainer in interface ComponentAdapter

getDelegate

public ComponentAdapter getDelegate()

setContainer

public void setContainer(PicoContainer picoContainer)
Description copied from interface: ComponentAdapter
Sets the container in which this instance is registered, called by the container upon registration.

Specified by:
setContainer in interface ComponentAdapter
Parameters:
picoContainer -


Copyright © 2003-2004 Codehaus. All Rights Reserved.