org.picocontainer.defaults
Class BeanPropertyComponentAdapterFactory

java.lang.Object
  extended byorg.picocontainer.defaults.DecoratingComponentAdapterFactory
      extended byorg.picocontainer.defaults.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.5 $
Author:
Aslak Hellesøy

Nested Class Summary
 class BeanPropertyComponentAdapterFactory.Adapter
           
static class BeanPropertyComponentAdapterFactory.NoSuchPropertyException
           
static class BeanPropertyComponentAdapterFactory.PicoBeanInfoInitializationException
           
 
Constructor Summary
BeanPropertyComponentAdapterFactory(ComponentAdapterFactory delegate)
           
 
Method Summary
 ComponentAdapter createComponentAdapter(java.lang.Object componentKey, java.lang.Class componentImplementation, Parameter[] parameters)
           
 BeanPropertyComponentAdapterFactory.Adapter getComponentAdapter(java.lang.Object key)
           
 void setProperties(java.lang.Object componentKey, java.util.Map properties)
          Deprecated. (In 1.0-beta-5) This method has been deprecated since it requires properties to be set pior to the instantiation of the adapter. This might be inconvenient in some scenarios. Please use BeanPropertyComponentAdapterFactory.Adapter.setProperties(Map) instead.
 
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(java.lang.Object componentKey,
                                               java.lang.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(java.lang.Object componentKey,
                          java.util.Map properties)
Deprecated. (In 1.0-beta-5) This method has been deprecated since it requires properties to be set pior to the instantiation of the adapter. This might be inconvenient in some scenarios. Please use BeanPropertyComponentAdapterFactory.Adapter.setProperties(Map) instead.

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

getComponentAdapter

public BeanPropertyComponentAdapterFactory.Adapter getComponentAdapter(java.lang.Object key)


Copyright © 2003-2004 Codehaus. All Rights Reserved.