org.picocontainer.defaults
Class SetterInjectionComponentAdapterFactory

java.lang.Object
  extended by org.picocontainer.defaults.MonitoringComponentAdapterFactory
      extended by org.picocontainer.defaults.SetterInjectionComponentAdapterFactory
All Implemented Interfaces:
java.io.Serializable, ComponentAdapterFactory, ComponentMonitorStrategy

public class SetterInjectionComponentAdapterFactory
extends MonitoringComponentAdapterFactory

A ComponentAdapterFactory for JavaBeans. The factory creates SetterInjectionComponentAdapter.

Version:
$Revision: 2768 $
Author:
Jörg Schaible
See Also:
Serialized Form

Field Summary
private  boolean allowNonPublicClasses
           
private  LifecycleStrategy lifecycleStrategy
           
 
Constructor Summary
SetterInjectionComponentAdapterFactory()
           
SetterInjectionComponentAdapterFactory(boolean allowNonPublicClasses)
           
SetterInjectionComponentAdapterFactory(boolean allowNonPublicClasses, LifecycleStrategy lifecycleStrategy)
           
 
Method Summary
 ComponentAdapter createComponentAdapter(java.lang.Object componentKey, java.lang.Class componentImplementation, Parameter[] parameters)
          Create a SetterInjectionComponentAdapter.
 
Methods inherited from class org.picocontainer.defaults.MonitoringComponentAdapterFactory
changeMonitor, currentMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allowNonPublicClasses

private final boolean allowNonPublicClasses

lifecycleStrategy

private LifecycleStrategy lifecycleStrategy
Constructor Detail

SetterInjectionComponentAdapterFactory

public SetterInjectionComponentAdapterFactory(boolean allowNonPublicClasses,
                                              LifecycleStrategy lifecycleStrategy)

SetterInjectionComponentAdapterFactory

public SetterInjectionComponentAdapterFactory(boolean allowNonPublicClasses)

SetterInjectionComponentAdapterFactory

public SetterInjectionComponentAdapterFactory()
Method Detail

createComponentAdapter

public ComponentAdapter createComponentAdapter(java.lang.Object componentKey,
                                               java.lang.Class componentImplementation,
                                               Parameter[] parameters)
                                        throws PicoIntrospectionException,
                                               AssignabilityRegistrationException,
                                               NotConcreteRegistrationException
Create a SetterInjectionComponentAdapter.

Parameters:
componentKey - The component's key
componentImplementation - The class of the bean.
parameters - Any parameters for the setters. If null the adapter solves the dependencies for all setters internally. Otherwise the number parameters must match the number of the setter.
Returns:
Returns a new SetterInjectionComponentAdapter.
Throws:
PicoIntrospectionException - if dependencies cannot be solved
AssignabilityRegistrationException - if the componentKey is a type that does not match the implementation
NotConcreteRegistrationException - if the implementation is an interface or an abstract class.