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
-
Constructor Summary
Constructors Constructor Description IncludeListBeanFactory()Default constructor. -
Method Summary
Modifier and Type Method Description ObjectcreateBean(Class beanClass, org.apache.commons.configuration.beanutils.BeanDeclaration decl, Object param)
-
Constructor Details
-
IncludeListBeanFactory
public IncludeListBeanFactory()Default constructor.
-
-
Method Details
-
createBean
public Object createBean(Class beanClass, org.apache.commons.configuration.beanutils.BeanDeclaration decl, Object param) throws Exception- Specified by:
createBeanin interfaceorg.apache.commons.configuration.beanutils.BeanFactory- Overrides:
createBeanin classorg.apache.commons.configuration.beanutils.DefaultBeanFactory- Throws:
Exception
-