org.picocontainer.defaults
Class ConstructorInjectionComponentAdapter
java.lang.Object
org.picocontainer.defaults.AbstractComponentAdapter
org.picocontainer.defaults.InstantiatingComponentAdapter
org.picocontainer.defaults.ConstructorInjectionComponentAdapter
- All Implemented Interfaces:
- ComponentAdapter, Serializable
- public class ConstructorInjectionComponentAdapter
- extends InstantiatingComponentAdapter
Instantiates components using Constructor Injection.
Note that this class doesn't cache instances. If you want caching,
use a CachingComponentAdapter
around this one.
- Version:
- $Revision: 1.13 $
- Author:
- Paul Hammant, Aslak Hellesøy, Jon Tirsén, Zohar Melamed, Jörg Schaible
- See Also:
- Serialized Form
ConstructorInjectionComponentAdapter
public ConstructorInjectionComponentAdapter(Object componentKey,
Class componentImplementation,
Parameter[] parameters,
boolean allowNonPublicClasses)
throws AssignabilityRegistrationException,
NotConcreteRegistrationException
- Explicitly specifies parameters. If parameters are null, default parameters
will be used.
ConstructorInjectionComponentAdapter
public ConstructorInjectionComponentAdapter(Object componentKey,
Class componentImplementation,
Parameter[] parameters)
ConstructorInjectionComponentAdapter
public ConstructorInjectionComponentAdapter(Object componentKey,
Class componentImplementation)
throws AssignabilityRegistrationException,
NotConcreteRegistrationException
- Use default parameters.
getGreediestSatisifableConstructor
protected Constructor getGreediestSatisifableConstructor(List adapterInstantiationOrderTrackingList)
throws PicoIntrospectionException,
UnsatisfiableDependenciesException,
AmbiguousComponentResolutionException,
AssignabilityRegistrationException,
NotConcreteRegistrationException
- Specified by:
getGreediestSatisifableConstructor
in class InstantiatingComponentAdapter
- Throws:
PicoIntrospectionException
UnsatisfiableDependenciesException
AmbiguousComponentResolutionException
AssignabilityRegistrationException
NotConcreteRegistrationException
instantiateComponent
protected Object instantiateComponent(List adapterInstantiationOrderTrackingList)
throws PicoInitializationException,
PicoIntrospectionException,
AssignabilityRegistrationException,
NotConcreteRegistrationException
- Description copied from class:
InstantiatingComponentAdapter
- Instantiate the object.
- Specified by:
instantiateComponent
in class InstantiatingComponentAdapter
- Parameters:
adapterInstantiationOrderTrackingList
- This list is filled with the dependent adapters of the instance.
- Returns:
- Returns the new instance.
- Throws:
PicoInitializationException
AssignabilityRegistrationException
NotConcreteRegistrationException
PicoIntrospectionException
getConstructorArguments
protected Object[] getConstructorArguments(List adapterDependencies)
Copyright © 2003-2004 Codehaus. All Rights Reserved.