Class IncludeListBeanFactory<T>

Object
org.apache.commons.configuration.beanutils.DefaultBeanFactory
org.anchoranalysis.bean.xml.factory.AnchorBeanFactory
org.anchoranalysis.bean.xml.factory.IncludeListBeanFactory<T>
Type Parameters:
T - list-item type
All Implemented Interfaces:
org.apache.commons.configuration.beanutils.BeanFactory

public class IncludeListBeanFactory<T>
extends AnchorBeanFactory
Like ListBeanFactory but also includes elements in other lists defined in the include tag. as elements.

This is particularly useful when combined with the include factory, to include elements from other XML files.

For example:

<config>
 <bean config-class="java.util.List" config-factory="listInclude">

 <include>
      <item config-class="java.util.List" config-factory="include" filePath="fileToInclude.xml"/>
      <item config-class="java.util.List" config-factory="include" filePath="anotherFileToInclude.xml"/>
 </include>

 <item config-class="org.anchoranalysis.bean.SomeBean"/>
 <item config-class="org.anchoranalysis.bean.SomeBean"/>
 <item config-class="org.anchoranalysis.bean.SomeBean"/>

 </bean>
 </config>
Author:
Owen Feehan
  • Field Summary

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

    INSTANCE
  • Constructor Summary

    Constructors 
    Constructor Description
    IncludeListBeanFactory()
    Default constructor.
  • Method Summary

    Modifier and Type Method Description
    Object 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

  • 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