More granular(sets the property of a bean based on a key value).

@param bean
@param key
@param value
@throws NoSuchMethodException
@throws IllegalAccessException
@throws IllegalArgumentException
@throws InvocationTargetException
514731
public static void applyKVToBean(Object bean, String key, Object value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
        Method getterMethod = bean.getClass().getMethod(Util.getterMethodName(key));
        Method setterMethod = bean.getClass().getMethod(Util.setterMethodName(key), getterMethod.getReturnType());
        setterMethod.invoke(bean, value);
    }
928747
public void put(String beanName, Class<?> clazz, Method method,
			ApplicationContext context) {
		MethodInfo info = new MethodInfo(clazz, context, beanName, method);
		this.cache.put(new Key(beanName, method.getName()), info);
	}
366112
public void set(String name, Object value) throws IllegalArgumentException, ClassCastException {
        if (bean != null) {
            BeanInvoker handle = getWriteInvoker(name);
            if (handle == null) {
                return;
            }
            try {
                if (value instanceof BeanMap) {
                    value = ((BeanMap) value).bean;
                }
                handle.invoke(value);
                firePropertyChange(name, null, value);
            } catch (Throwable e) {
                throw new IllegalArgumentException(e.getMessage());
            }
        }
    }
1348153
public <TEnum extends Enum<TEnum>> void set(String key, TEnum value)
    {
        setEnum(key, value);
    }
548069
public static void mapping(Object src, Object target) throws BeanMappingException {
        BeanMapping mapping = BeanMapping.create(src.getClass(), target.getClass());
        mapping.mapping(src, target);
    }
1334977
public void set(String key, Object value) {
		if (globalVar == null) globalVar = new HashMap<String, Object>();
		globalVar.put(key, value);
	}
469082
public final void put(final String key, final String value) {
        final Property prop = find(key);
        if (prop == null) {
            props.add(new Property(key, null, value));
        } else {
            prop.setValue(value);
        }
    }
1096133
private void setParameter(String key, Object value){
        if (value == null){
            parameters.remove(key);
        }     
        else{
            parameters.put(key, value);
        }
    }
463411
void setValue(T bean, String value) {
    ref.writeValue(converter.fromCharacters(value), bean);
  }
474009
protected void setValueToField(Field field, Object bean, Object value) {
        try {
            field.setAccessible(true);
            field.set(bean, value);
        } catch (Exception e) {
            throw new PropertyLoaderException(
                    String.format("Can not set bean <%s> field <%s> value", bean, field), e
            );
        }
    }
1041489
public static void setProperty(Object bean, String expression, Object value) {
		BeanPath.create(expression).set(bean, value);
	}
111846
public static void set(final Object bean, final String property, Object value) {

        try {
            if (property.indexOf(".") >= 0) {

                final String firstProperty = property.substring(0, property.indexOf("."));
                Object subBean = ClassMockUtils.get(bean, firstProperty);

                if (subBean == null) {

                    subBean = ClassMockUtils.getPropertyClass(bean.getClass(), firstProperty).newInstance();
                    ClassMockUtils.set(bean, firstProperty, subBean);
                }

                final String newProperty = property.substring(property.indexOf(".") + 1);
                ClassMockUtils.set(subBean, newProperty, value);

                return;
            }

            Method setterMethod = null;

            for (final Method method : bean.getClass().getMethods()) {

                if (method.getName().equals(ClassMockUtils.propertyToSetter(property))) {

                    setterMethod = method;
                    break;
                }
            }

            if (setterMethod != null) {

                final Class<?> type = setterMethod.getParameterTypes()[0];

                if (type == null) {

                    throw new RuntimeException("The setter method of " + property + " does not have a parameter.");

                } else if (type.isArray() && !type.getComponentType().isPrimitive()) {

                    final Object[] array = (Object[]) Array.newInstance(type.getComponentType(), ((Object[]) value).length);

                    for (int i = 0; i < array.length; i++) {

                        array[i] = type.getComponentType().cast(((Object[]) value)[i]);
                    }

                    setterMethod.invoke(bean, new Object[] { array });

                } else {

                    if ((value instanceof String) && ((type == Integer.class) || (type == int.class))) {
                        value = Integer.parseInt((String) value);
                    } else if ((value instanceof String) && ((type == Long.class) || (type == long.class))) {
                        value = Long.parseLong((String) value);
                    } else if ((value instanceof String) && ((type == Byte.class) || (type == byte.class))) {
                        value = Byte.parseByte((String) value);
                    } else if ((value instanceof String) && ((type == Short.class) || (type == short.class))) {
                        value = Short.parseShort((String) value);
                    } else if ((value instanceof String) && ((type == Float.class) || (type == float.class))) {
                        value = Float.parseFloat((String) value);
                    } else if ((value instanceof String) && ((type == Double.class) || (type == double.class))) {
                        value = Double.parseDouble((String) value);
                    } else if ((value instanceof String) && ((type == Boolean.class) || (type == boolean.class))) {
                        value = Boolean.parseBoolean((String) value);
                    }

                    setterMethod.invoke(bean, value);
                }
            }
        } catch (final Exception e) {

            throw new RuntimeException("Can't set property " + property + " in the class " + bean.getClass().getName());
        }
    }
861954
public void set(String key, String value)
    {
        if(key == null)
            throw new IllegalArgumentException("Null keys not allowed.");

        if(value == null)
            throw new IllegalArgumentException("Null values not allowed.");

        ArrayList<String> vals = new ArrayList<String>();
        vals.add(value);
        map.put(key,vals);

    }
775555
public static void set(String key, String value) {
        PROPS.get().setProperty(key, value);
    }
985374
@Override
  public void setProp(String key, Object value) {
    super.setProp(key, value);
    for (WorkUnit workUnit : this.workUnits) {
      workUnit.setProp(key, value);
    }
  }
622141
public static void populate(Object target, Map properties) throws BeanMappingException {
        BeanMap map = BeanMap.create(target.getClass());
        map.populate(target, properties);
    }
33857
@JsonAnySetter
    public void putConfigurationValue(String key, Object value) {
        this.configuration.put(key, value);
    }