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

Constructor Summary
InstanceComponentAdapter(Object componentKey, Object componentInstance)
           
 
Method Summary
 Object getComponentInstance(MutablePicoContainer picoContainer)
          Gets the component instance.
 
Methods inherited from class org.picocontainer.defaults.AbstractComponentAdapter
getComponentImplementation, getComponentKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceComponentAdapter

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

getComponentInstance

public Object getComponentInstance(MutablePicoContainer picoContainer)
Description copied from interface: ComponentAdapter
Gets the component instance. Subsequent calls to this method with the same arguments should return the same object (it should be caching).

This method should also register the instantiated component with the pico container.

Parameters:
picoContainer - registries where the adapter can look for dependent component instances
Returns:
the component instance


Copyright © 2003 Codehaus. All Rights Reserved.