org.apache.commons.configuration

Class DefaultConfigurationBuilder.ConfigurationBeanFactory

static class DefaultConfigurationBuilder.ConfigurationBeanFactory extends Object implements BeanFactory

A specialized BeanFactory implementation that handles configuration declarations. This class will retrieve the correct configuration provider and delegate the task of creating the configuration to this object.
Method Summary
ObjectcreateBean(Class beanClass, BeanDeclaration data, Object param)
Creates an instance of a bean class.
ClassgetDefaultBeanClass()
Returns the default class for this bean factory.

Method Detail

createBean

public Object createBean(Class beanClass, BeanDeclaration data, Object param)
Creates an instance of a bean class. This implementation expects that the passed in bean declaration is a declaration for a configuration. It will determine the responsible configuration provider and delegate the call to this instance. If creation of the configuration fails and the optional attribute is set, the exception will be ignored. If the forceCreate attribute is set, too, the provider is asked to create an empty configuration. A return value of null means that no configuration could be created.

Parameters: beanClass the bean class (will be ignored) data the declaration param an additional parameter (will be ignored)

Returns: the newly created configuration

Throws: Exception if an error occurs

getDefaultBeanClass

public Class getDefaultBeanClass()
Returns the default class for this bean factory.

Returns: the default class