public static void invokeSetterMethod(Object target, String name, Object value, Class<?> type) throws Exception {

		Class<?>[] paramTypes = (type != null ? new Class<?>[] { type } : null);

		String setterMethodName = name;
		if (!name.startsWith("set")) {
			setterMethodName = "set" + StringUtils.capitalize(name);
		}
		Method method = findMethod(target.getClass(), setterMethodName, paramTypes);
		if (method == null && !setterMethodName.equals(name)) {
			setterMethodName = name;
			method = ReflectionUtils.findMethod(target.getClass(), setterMethodName, paramTypes);
		}
		if (method == null) {
			return;
		}
		makeAccessible(method);
		method.invoke(target, new Object[] { value });
	}