org.picocontainer.extras
Class BeanPropertyComponentAdapterFactory

java.lang.Object
  extended byorg.picocontainer.extras.DecoratingComponentAdapterFactory
      extended byorg.picocontainer.extras.BeanPropertyComponentAdapterFactory
All Implemented Interfaces:
ComponentAdapterFactory

public class BeanPropertyComponentAdapterFactory
extends DecoratingComponentAdapterFactory

A generic ComponentAdapter that will set bean properties on the instantiated component. Properties can be set on beforehand via the setProperties(java.lang.Object, java.util.Map) method.

Version:
$Revision: 1.13 $
Author:
Aslak Hellesøy

Nested Class Summary
static class BeanPropertyComponentAdapterFactory.NoSuchPropertyException
           
static class BeanPropertyComponentAdapterFactory.PicoBeanInfoInitializationException
           
 
Constructor Summary
BeanPropertyComponentAdapterFactory(ComponentAdapterFactory delegate)
           
 
Method Summary
 ComponentAdapter createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters)
           
 void setProperties(Object componentKey, Map properties)
          Set properties to set upon the component instance upon instantiation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanPropertyComponentAdapterFactory

public BeanPropertyComponentAdapterFactory(ComponentAdapterFactory delegate)
Method Detail

createComponentAdapter

public ComponentAdapter createComponentAdapter(Object componentKey,
                                               Class componentImplementation,
                                               Parameter[] parameters)
                                        throws PicoIntrospectionException,
                                               AssignabilityRegistrationException,
                                               NotConcreteRegistrationException
Specified by:
createComponentAdapter in interface ComponentAdapterFactory
Overrides:
createComponentAdapter in class DecoratingComponentAdapterFactory
Throws:
PicoIntrospectionException
AssignabilityRegistrationException
NotConcreteRegistrationException

setProperties

public void setProperties(Object componentKey,
                          Map properties)
Set properties to set upon the component instance upon instantiation.

Parameters:
componentKey - key of component instance where properties should be set.
properties - map of bean property name -> property value


Copyright © 2003-2004 Codehaus. All Rights Reserved.