org.picocontainer.defaults
Class InstanceComponentAdapter

java.lang.Object
  extended byorg.picocontainer.defaults.AbstractComponentAdapter
      extended byorg.picocontainer.defaults.InstanceComponentAdapter
All Implemented Interfaces:
ComponentAdapter, Serializable

public class InstanceComponentAdapter
extends AbstractComponentAdapter

Version:
$Revision: 1.12 $
Author:
Aslak Hellesøy, Paul Hammant
See Also:
Serialized Form

Constructor Summary
InstanceComponentAdapter(Object componentKey, Object componentInstance)
           
 
Method Summary
 Object getComponentInstance(PicoContainer container)
          Retrieve the component instance.
 void verify(PicoContainer container)
          Verify that all dependencies for this adapter can be satisifed.
 
Methods inherited from class org.picocontainer.defaults.AbstractComponentAdapter
accept, checkTypeCompatibility, getComponentImplementation, getComponentKey, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstanceComponentAdapter

public InstanceComponentAdapter(Object componentKey,
                                Object componentInstance)
                         throws AssignabilityRegistrationException,
                                NotConcreteRegistrationException
Method Detail

getComponentInstance

public Object getComponentInstance(PicoContainer container)
Description copied from interface: ComponentAdapter
Retrieve the component instance. This method will usually create a new instance each time it is called, but that is not required. For example, CachingComponentAdapter will always return the same instance.

Parameters:
container - the PicoContainer, that is used to resolve any possible dependencies of the instance.
Returns:
the component instance.

verify

public void verify(PicoContainer container)
Description copied from interface: ComponentAdapter
Verify that all dependencies for this adapter can be satisifed. Normally, the adapter should verify this by checking that the associated PicoContainer contains all the needed dependnecies.

Parameters:
container - the PicoContainer, that is used to resolve any possible dependencies of the instance.


Copyright © 2003-2004 Codehaus. All Rights Reserved.