org.picocontainer.defaults
Class SetterInjectionComponentAdapterFactory

java.lang.Object
  extended byorg.picocontainer.defaults.SetterInjectionComponentAdapterFactory
All Implemented Interfaces:
ComponentAdapterFactory, Serializable

public class SetterInjectionComponentAdapterFactory
extends Object
implements ComponentAdapterFactory, Serializable

A ComponentAdapterFactory for JavaBeans. The factory creates SetterInjectionComponentAdapter.

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

Constructor Summary
SetterInjectionComponentAdapterFactory()
           
SetterInjectionComponentAdapterFactory(boolean allowNonPublicClasses)
           
 
Method Summary
 ComponentAdapter createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
          Create a SetterInjectionComponentAdapter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetterInjectionComponentAdapterFactory

public SetterInjectionComponentAdapterFactory(boolean allowNonPublicClasses)

SetterInjectionComponentAdapterFactory

public SetterInjectionComponentAdapterFactory()
Method Detail

createComponentAdapter

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

Specified by:
createComponentAdapter in interface ComponentAdapterFactory
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.


Copyright © 2003-2004 Codehaus. All Rights Reserved.