org.picocontainer.defaults
Class DefaultComponentAdapter

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

public class DefaultComponentAdapter
extends TransientComponentAdapter

Version:
$Revision: 1.17 $
Author:
Jon Tirsén
See Also:
Serialized Form

Constructor Summary
DefaultComponentAdapter(Object componentKey, Class componentImplementation)
          Use default parameters.
DefaultComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
          Explicitly specifies parameters, if null uses default parameters.
 
Method Summary
 Object getComponentInstance(MutablePicoContainer picoContainer)
          Gets the component instance.
 
Methods inherited from class org.picocontainer.defaults.TransientComponentAdapter
equals, getDependencies, isAssignableFrom
 
Methods inherited from class org.picocontainer.defaults.AbstractComponentAdapter
getComponentImplementation, getComponentKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultComponentAdapter

public DefaultComponentAdapter(Object componentKey,
                               Class componentImplementation,
                               Parameter[] parameters)
                        throws AssignabilityRegistrationException,
                               NotConcreteRegistrationException
Explicitly specifies parameters, if null uses default parameters.

Parameters:
componentKey -
componentImplementation -
parameters -

DefaultComponentAdapter

public DefaultComponentAdapter(Object componentKey,
                               Class componentImplementation)
                        throws AssignabilityRegistrationException,
                               NotConcreteRegistrationException
Use default parameters.

Parameters:
componentKey -
componentImplementation -
Method Detail

getComponentInstance

public Object getComponentInstance(MutablePicoContainer picoContainer)
                            throws PicoInitializationException,
                                   PicoIntrospectionException,
                                   AssignabilityRegistrationException,
                                   NotConcreteRegistrationException
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.

Specified by:
getComponentInstance in interface ComponentAdapter
Overrides:
getComponentInstance in class TransientComponentAdapter
Throws:
PicoInitializationException
PicoIntrospectionException
AssignabilityRegistrationException
NotConcreteRegistrationException


Copyright © 2003 Codehaus. All Rights Reserved.