|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.picocontainer.defaults.MonitoringComponentAdapter
org.picocontainer.defaults.AbstractComponentAdapter
org.picocontainer.defaults.InstantiatingComponentAdapter
org.picocontainer.defaults.ConstructorInjectionComponentAdapter
Instantiates components using Constructor Injection.
Note that this class doesn't cache instances. If you want caching,
use a CachingComponentAdapter around this one.
| Field Summary |
| Fields inherited from class org.picocontainer.defaults.InstantiatingComponentAdapter |
allowNonPublicClasses, lifecycleStrategy, parameters, verifyingGuard |
| Constructor Summary | |
ConstructorInjectionComponentAdapter(Object componentKey,
Class componentImplementation)
Creates a ConstructorInjectionComponentAdapter with key and implementation |
|
ConstructorInjectionComponentAdapter(Object componentKey,
Class componentImplementation,
Parameter[] parameters)
Creates a ConstructorInjectionComponentAdapter with key, implementation and parameters |
|
ConstructorInjectionComponentAdapter(Object componentKey,
Class componentImplementation,
Parameter[] parameters,
boolean allowNonPublicClasses)
Creates a ConstructorInjectionComponentAdapter |
|
ConstructorInjectionComponentAdapter(Object componentKey,
Class componentImplementation,
Parameter[] parameters,
boolean allowNonPublicClasses,
ComponentMonitor monitor)
Creates a ConstructorInjectionComponentAdapter |
|
ConstructorInjectionComponentAdapter(Object componentKey,
Class componentImplementation,
Parameter[] parameters,
boolean allowNonPublicClasses,
ComponentMonitor monitor,
LifecycleStrategy lifecycleStrategy)
Creates a ConstructorInjectionComponentAdapter |
|
| Method Summary | |
Object |
getComponentInstance(PicoContainer container)
Retrieve the component instance. |
protected Object[] |
getConstructorArguments(PicoContainer container,
Constructor ctor)
|
protected Constructor |
getGreediestSatisfiableConstructor(PicoContainer container)
Find and return the greediest satisfiable constructor. |
| Methods inherited from class org.picocontainer.defaults.InstantiatingComponentAdapter |
accept, createDefaultParameters, dispose, hasLifecycle, newInstance, start, stop, verify |
| Methods inherited from class org.picocontainer.defaults.AbstractComponentAdapter |
checkTypeCompatibility, getComponentImplementation, getComponentKey, toString |
| Methods inherited from class org.picocontainer.defaults.MonitoringComponentAdapter |
changeMonitor, currentMonitor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ConstructorInjectionComponentAdapter(Object componentKey,
Class componentImplementation,
Parameter[] parameters,
boolean allowNonPublicClasses,
ComponentMonitor monitor,
LifecycleStrategy lifecycleStrategy)
throws AssignabilityRegistrationException,
NotConcreteRegistrationException
componentKey - the search key for this implementationcomponentImplementation - the concrete implementationparameters - the parameters to use for the initializationallowNonPublicClasses - flag to allow instantiation of non-public classes.monitor - the component monitor used by this adapterlifecycleStrategy - the component lifecycle strategy used by this adapter
AssignabilityRegistrationException - if the key is a type and the implementation cannot be assigned to.
NotConcreteRegistrationException - if the implementation is not a concrete class.
NullPointerException - if one of the parameters is null
public ConstructorInjectionComponentAdapter(Object componentKey,
Class componentImplementation,
Parameter[] parameters,
boolean allowNonPublicClasses,
ComponentMonitor monitor)
throws AssignabilityRegistrationException,
NotConcreteRegistrationException
componentKey - the search key for this implementationcomponentImplementation - the concrete implementationparameters - the parameters to use for the initializationallowNonPublicClasses - flag to allow instantiation of non-public classes.monitor - the component monitor used by this adapter
AssignabilityRegistrationException - if the key is a type and the implementation cannot be assigned to.
NotConcreteRegistrationException - if the implementation is not a concrete class.
NullPointerException - if one of the parameters is null
public ConstructorInjectionComponentAdapter(Object componentKey,
Class componentImplementation,
Parameter[] parameters,
boolean allowNonPublicClasses)
throws AssignabilityRegistrationException,
NotConcreteRegistrationException
componentKey - the search key for this implementationcomponentImplementation - the concrete implementationparameters - the parameters to use for the initializationallowNonPublicClasses - flag to allow instantiation of non-public classes.
AssignabilityRegistrationException - if the key is a type and the implementation cannot be assigned to.
NotConcreteRegistrationException - if the implementation is not a concrete class.
NullPointerException - if one of the parameters is null
public ConstructorInjectionComponentAdapter(Object componentKey,
Class componentImplementation,
Parameter[] parameters)
componentKey - the search key for this implementationcomponentImplementation - the concrete implementationparameters - the parameters to use for the initialization
AssignabilityRegistrationException - if the key is a type and the implementation cannot be assigned to.
NotConcreteRegistrationException - if the implementation is not a concrete class.
NullPointerException - if one of the parameters is null
public ConstructorInjectionComponentAdapter(Object componentKey,
Class componentImplementation)
throws AssignabilityRegistrationException,
NotConcreteRegistrationException
componentKey - the search key for this implementationcomponentImplementation - the concrete implementation
AssignabilityRegistrationException - if the key is a type and the implementation cannot be assigned to.
NotConcreteRegistrationException - if the implementation is not a concrete class.
NullPointerException - if one of the parameters is null| Method Detail |
protected Constructor getGreediestSatisfiableConstructor(PicoContainer container)
throws PicoIntrospectionException,
UnsatisfiableDependenciesException,
AmbiguousComponentResolutionException,
AssignabilityRegistrationException,
NotConcreteRegistrationException
InstantiatingComponentAdapter
getGreediestSatisfiableConstructor in class InstantiatingComponentAdaptercontainer - the PicoContainer to resolve dependencies.
AssignabilityRegistrationException
PicoIntrospectionException
UnsatisfiableDependenciesException
AmbiguousComponentResolutionException
NotConcreteRegistrationException
public Object getComponentInstance(PicoContainer container)
throws PicoInitializationException,
PicoIntrospectionException,
AssignabilityRegistrationException,
NotConcreteRegistrationException
ComponentAdapterCachingComponentAdapter will always return the
same instance.
container - the PicoContainer, that is used to resolve any possible dependencies of the instance.
PicoInitializationException - if the component could not be instantiated.
PicoIntrospectionException - if the component has dependencies which could not be resolved, or
instantiation of the component lead to an ambigous situation within the
container.
AssignabilityRegistrationException
NotConcreteRegistrationException
protected Object[] getConstructorArguments(PicoContainer container,
Constructor ctor)
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||