org.picocontainer.defaults
Class ConstructorComponentAdapter
java.lang.Object
org.picocontainer.defaults.AbstractComponentAdapter
org.picocontainer.defaults.InstantiatingComponentAdapter
org.picocontainer.defaults.ConstructorComponentAdapter
- All Implemented Interfaces:
- ComponentAdapter, Serializable
- Direct Known Subclasses:
- TransientComponentAdapter
- public class ConstructorComponentAdapter
- extends InstantiatingComponentAdapter
Instantiates components using Constructor-Based Dependency Injection.
{@inheritDoc}
- Version:
- $Revision: 1.6 $
- Author:
- Aslak Hellesøy, Paul Hammant, Jon Tirsén, Zohar Melamed
- See Also:
- Serialized Form
ConstructorComponentAdapter
public ConstructorComponentAdapter(Object componentKey,
Class componentImplementation,
Parameter[] parameters)
throws AssignabilityRegistrationException,
NotConcreteRegistrationException
- Explicitly specifies parameters, if null uses default parameters.
{@inheritDoc}
ConstructorComponentAdapter
public ConstructorComponentAdapter(Object componentKey,
Class componentImplementation)
throws AssignabilityRegistrationException,
NotConcreteRegistrationException
- Use default parameters.
{@inheritDoc}
getMostSatisfiableDependencyTypes
protected Class[] getMostSatisfiableDependencyTypes(PicoContainer dependencyContainer)
throws PicoIntrospectionException,
AmbiguousComponentResolutionException,
AssignabilityRegistrationException,
NotConcreteRegistrationException
- Specified by:
getMostSatisfiableDependencyTypes
in class InstantiatingComponentAdapter
- Throws:
PicoIntrospectionException
AmbiguousComponentResolutionException
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.