Class IncludeBeanFactory
Object
org.apache.commons.configuration.beanutils.DefaultBeanFactory
AnchorBeanFactory
IncludeBeanFactory
- All Implemented Interfaces:
org.apache.commons.configuration.beanutils.BeanFactory
Defines an
AnchorBean
in a separate file on the file-system.
This file is read from filePath
and loaded and integrated with current bean, as if the
XML was contained directly in the object being loaded.
By default, the referenced bean should be specified as <config><bean>bla
blah</bean></config>
in the included XML.
An optional parameter xpath
allows referencing an another element in the XML tree. It
defaults to bean
.
The config
high-level tag is not considered in the XML tree, and should not be part of
xpath
.
As an example: <input filePath="inputManager.xml"
config-class="org.anchoranalysis.io.bean.input.InputManager" config-factory="include"/>
- Author:
- Owen Feehan
-
Field Summary
Fields inherited from class org.apache.commons.configuration.beanutils.DefaultBeanFactory
INSTANCE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBean
(Class beanClass, org.apache.commons.configuration.beanutils.BeanDeclaration decl, Object param) Methods inherited from class org.apache.commons.configuration.beanutils.DefaultBeanFactory
createBeanInstance, getDefaultBeanClass, initBeanInstance
-
Constructor Details
-
IncludeBeanFactory
public IncludeBeanFactory()
-
-
Method Details
-
createBean
public Object createBean(Class beanClass, org.apache.commons.configuration.beanutils.BeanDeclaration decl, Object param) throws Exception - Specified by:
createBean
in interfaceorg.apache.commons.configuration.beanutils.BeanFactory
- Overrides:
createBean
in classorg.apache.commons.configuration.beanutils.DefaultBeanFactory
- Throws:
Exception
-