public void setProperty()

in core/src/main/java/hudson/util/spring/DefaultBeanConfiguration.java [69:127]


    public void setProperty(String property, Object newValue) {
        if(PARENT.equals(property)) {
            setParent(newValue);
        }
        else {
            AbstractBeanDefinition bd = getBeanDefinition();
            if(AUTOWIRE.equals(property)) {
                if(BY_NAME.equals(newValue)) {
                    bd.setAutowireMode(AutowireCapableBeanFactory.AUTOWIRE_BY_NAME);
                }
                else if(BY_TYPE.equals(newValue)) {
                    bd.setAutowireMode(AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE);
                }
                else if(Boolean.TRUE.equals(newValue)) {
                    bd.setAutowireMode(AutowireCapableBeanFactory.AUTOWIRE_BY_NAME);
                }
                else if(BY_CONSTRUCTOR.equals(newValue)) {
                    bd.setAutowireMode(AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR);
                }
            }
            // constructorArgs
            else if(CONSTRUCTOR_ARGS.equals(property) && newValue instanceof List) {
                ConstructorArgumentValues cav = new ConstructorArgumentValues();
                List args = (List)newValue;
                for (Object e : args) {
                    cav.addGenericArgumentValue(e);
                }
                bd.setConstructorArgumentValues(cav);
            }
            // destroyMethod
            else if(DESTROY_METHOD.equals(property)) {
                if(newValue != null)
                    bd.setDestroyMethodName(newValue.toString());
            }
            // factoryBean
            else if(FACTORY_BEAN.equals(property)) {
                if(newValue != null)
                    bd.setFactoryBeanName(newValue.toString());
            }
            // factoryMethod
            else if(FACTORY_METHOD.equals(property)) {
                if(newValue != null)
                    bd.setFactoryMethodName(newValue.toString());
            }
            // initMethod
            else if(INIT_METHOD.equals(property)) {
                if(newValue != null)
                    bd.setInitMethodName(newValue.toString());
            }
            else if(wrapper.isWritableProperty(property)) {

                wrapper.setPropertyValue(property, newValue);
            }
            // autowire
            else {
                super.setProperty(property, newValue);
            }
        }
	}