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.11 $
Author:
Aslak Hellesøy, Paul Hammant
See Also:
Serialized Form

Constructor Summary
InstanceComponentAdapter(Object componentKey, Object componentInstance)
           
 
Method Summary
 Object getComponentInstance()
          Retrieve the component instance.
 void verify()
          Verify that all dependencies for this adapter can be satisifed.
 
Methods inherited from class org.picocontainer.defaults.AbstractComponentAdapter
getComponentImplementation, getComponentKey, getContainer, setContainer, 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()
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.

Returns:
the component instance.

verify

public void verify()
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.



Copyright © 2003-2004 Codehaus. All Rights Reserved.