public class IncludeBeanFactory extends AnchorBeanFactory
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"/>
Constructor and Description |
---|
IncludeBeanFactory() |
Modifier and Type | Method and Description |
---|---|
Object |
createBean(Class beanClass,
org.apache.commons.configuration.beanutils.BeanDeclaration decl,
Object param) |
public Object createBean(Class beanClass, org.apache.commons.configuration.beanutils.BeanDeclaration decl, Object param) throws Exception
createBean
in interface org.apache.commons.configuration.beanutils.BeanFactory
createBean
in class org.apache.commons.configuration.beanutils.DefaultBeanFactory
Exception
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.