Example usage for org.springframework.beans.factory.config ConstructorArgumentValues addArgumentValues

List of usage examples for org.springframework.beans.factory.config ConstructorArgumentValues addArgumentValues

Introduction

In this page you can find the example usage for org.springframework.beans.factory.config ConstructorArgumentValues addArgumentValues.

Prototype

public void addArgumentValues(@Nullable ConstructorArgumentValues other) 

Source Link

Document

Copy all given argument values into this object, using separate holder instances to keep the values independent from the original object.

Usage

From source file:com.apporiented.spring.override.BeanOverrideProcessor.java

private void overwriteBeanDefinition(BeanDefinition target, BeanDefinition source) {
    log.debug("Replacing bean [" + ref + "] with a [" + source.getBeanClassName() + "]");

    target.setBeanClassName(source.getBeanClassName());
    ConstructorArgumentValues cas = target.getConstructorArgumentValues();
    cas.clear();/*from  w  w  w  . j  a  va 2s  . c  o  m*/
    cas.addArgumentValues(source.getConstructorArgumentValues());

    MutablePropertyValues pvs = target.getPropertyValues();
    if (!merge) {
        pvs.getPropertyValueList().clear();
    }
    pvs.addPropertyValues(source.getPropertyValues());
}