org.picocontainer.defaults
Class BeanComponentAdapter

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

public class BeanComponentAdapter
extends InstantiatingComponentAdapter

Instantiates components using Setter-Based Dependency Injection. {@inheritDoc}

Version:
$Revision: 1.4 $
Author:
Aslak Hellesøy
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.picocontainer.defaults.InstantiatingComponentAdapter
parameters
 
Constructor Summary
BeanComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
           
 
Method Summary
protected  Object[] getConstructorArguments(ComponentAdapter[] adapterDependencies)
           
protected  Constructor getGreediestSatisifableConstructor(PicoContainer dependencyContainer)
           
protected  Class[] getMostSatisfiableDependencyTypes(PicoContainer dependencyContainer)
           
protected  Object instantiateComponent(ComponentAdapter[] adapterDependencies, PicoContainer dependencyContainer)
           
 
Methods inherited from class org.picocontainer.defaults.InstantiatingComponentAdapter
createDefaultParameters, getComponentInstance, verify
 
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

BeanComponentAdapter

public BeanComponentAdapter(Object componentKey,
                            Class componentImplementation,
                            Parameter[] parameters)
Method Detail

getMostSatisfiableDependencyTypes

protected Class[] getMostSatisfiableDependencyTypes(PicoContainer dependencyContainer)
                                             throws PicoIntrospectionException,
                                                    AmbiguousComponentResolutionException,
                                                    AssignabilityRegistrationException,
                                                    NotConcreteRegistrationException
Specified by:
getMostSatisfiableDependencyTypes in class InstantiatingComponentAdapter
Throws:
PicoIntrospectionException
AmbiguousComponentResolutionException
AssignabilityRegistrationException
NotConcreteRegistrationException

instantiateComponent

protected Object instantiateComponent(ComponentAdapter[] adapterDependencies,
                                      PicoContainer dependencyContainer)
                               throws PicoInitializationException,
                                      PicoIntrospectionException,
                                      AssignabilityRegistrationException,
                                      NotConcreteRegistrationException
Overrides:
instantiateComponent in class InstantiatingComponentAdapter
Throws:
PicoInitializationException
PicoIntrospectionException
AssignabilityRegistrationException
NotConcreteRegistrationException

getGreediestSatisifableConstructor

protected Constructor getGreediestSatisifableConstructor(PicoContainer dependencyContainer)
                                                  throws PicoIntrospectionException,
                                                         UnsatisfiableDependenciesException,
                                                         AmbiguousComponentResolutionException,
                                                         AssignabilityRegistrationException,
                                                         NotConcreteRegistrationException
Specified by:
getGreediestSatisifableConstructor in class InstantiatingComponentAdapter
Throws:
PicoIntrospectionException
UnsatisfiableDependenciesException
AmbiguousComponentResolutionException
AssignabilityRegistrationException
NotConcreteRegistrationException

getConstructorArguments

protected Object[] getConstructorArguments(ComponentAdapter[] adapterDependencies)
Specified by:
getConstructorArguments in class InstantiatingComponentAdapter


Copyright © 2003-2004 Codehaus. All Rights Reserved.