org.picocontainer.injectors
Class SetterInjection

java.lang.Object
  extended by org.picocontainer.injectors.SetterInjection
All Implemented Interfaces:
Serializable, ComponentFactory, InjectionFactory

public class SetterInjection
extends Object
implements InjectionFactory, Serializable

A ComponentFactory for JavaBeans. The factory creates SetterInjector.

Author:
Jörg Schaible
See Also:
Serialized Form

Constructor Summary
SetterInjection()
           
SetterInjection(String setterMethodPrefix)
           
 
Method Summary
 ComponentAdapter createComponentAdapter(ComponentMonitor componentMonitor, LifecycleStrategy lifecycleStrategy, Properties componentProperties, Object componentKey, Class componentImplementation, Parameter... parameters)
          Create a SetterInjector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetterInjection

public SetterInjection(String setterMethodPrefix)

SetterInjection

public SetterInjection()
Method Detail

createComponentAdapter

public ComponentAdapter createComponentAdapter(ComponentMonitor componentMonitor,
                                               LifecycleStrategy lifecycleStrategy,
                                               Properties componentProperties,
                                               Object componentKey,
                                               Class componentImplementation,
                                               Parameter... parameters)
                                        throws PicoCompositionException
Create a SetterInjector.

Specified by:
createComponentAdapter in interface ComponentFactory
Parameters:
componentMonitor -
lifecycleStrategy -
componentProperties -
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. @return Returns a new SetterInjector. @throws PicoCompositionException if dependencies cannot be solved @throws org.picocontainer.PicoCompositionException if the implementation is an interface or an abstract class.
Returns:
a new component adapter based on the specified arguments. Should not return null.
Throws:
PicoCompositionException - if the creation of the component adapter results in a PicoCompositionException.


Copyright © 2003-2007 Codehaus. All Rights Reserved.