Class ListBeanFactory<T>

Object
org.apache.commons.configuration.beanutils.DefaultBeanFactory
AnchorBeanFactory
ListBeanFactory<T>
Type Parameters:
T - list-item type
All Implemented Interfaces:
org.apache.commons.configuration.beanutils.BeanFactory

public class ListBeanFactory<T> extends AnchorBeanFactory
Factory for creating a List of beans.

Several <item>someitem</item> tags can be placed in the BeanXML and each becomes an item in the list


 <list config-class="java.util.List" config-factory="list">
 	<item config-class="someclass"/>
 	<item config-class="someclass"/>
   <item config-class="someclass"/>
 </list>
 
Author:
Owen Feehan
  • Field Summary

    Fields inherited from class org.apache.commons.configuration.beanutils.DefaultBeanFactory

    INSTANCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Creates a new ListBeanFactory instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    createBean(Class beanClass, org.apache.commons.configuration.beanutils.BeanDeclaration decl, Object param)
     

    Methods inherited from class org.apache.commons.configuration.beanutils.DefaultBeanFactory

    createBeanInstance, getDefaultBeanClass, initBeanInstance

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ListBeanFactory

      public ListBeanFactory(Function<List<T>,Object> creator)
      Creates a new ListBeanFactory instance.
      Parameters:
      creator - Creates an (untyped) object from a list of elements of type T.
    • ListBeanFactory

      public ListBeanFactory()
  • Method Details

    • createBean

      public Object createBean(Class beanClass, org.apache.commons.configuration.beanutils.BeanDeclaration decl, Object param) throws Exception
      Specified by:
      createBean in interface org.apache.commons.configuration.beanutils.BeanFactory
      Overrides:
      createBean in class org.apache.commons.configuration.beanutils.DefaultBeanFactory
      Throws:
      Exception