Class ReplacePropertyBeanFactory<T extends AnchorBean<T>>

Object
org.apache.commons.configuration.beanutils.DefaultBeanFactory
AnchorBeanFactory
ReplacePropertyBeanFactory<T>
Type Parameters:
T - type of bean to load
All Implemented Interfaces:
org.apache.commons.configuration.beanutils.BeanFactory

public class ReplacePropertyBeanFactory<T extends AnchorBean<T>> extends AnchorBeanFactory
Replaces a property (an XML element of attribute) on a bean before loading it.

The String attribute key specifies the name of the element or attribute to replace.

The replacement attribute or element specifies the replacement value, depending of whether it's an attribute or element.

  • Field Summary

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

    INSTANCE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new ReplacePropertyBeanFactory instance.
  • Method Summary

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

    • ReplacePropertyBeanFactory

      public ReplacePropertyBeanFactory(BeanInstanceMap defaultInstances)
      Creates a new ReplacePropertyBeanFactory instance.
      Parameters:
      defaultInstances - Default instances of different family-types of beans.
  • 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