public static Object getFieldValue(Object bean, String fieldName)
			throws IllegalAccessException {
		Assert.notNull(bean, "Bean cannot be null");
		Assert.hasText(fieldName, "Field name required");
		String[] nestedFields = StringUtils.tokenizeToStringArray(fieldName, ".");
		Class<?> componentClass = bean.getClass();
		Object value = bean;

		for (String nestedField : nestedFields) {
			Field field = getField(componentClass, nestedField);
			field.setAccessible(true);
			value = field.get(value);
			if (value != null) {
				componentClass = value.getClass();
			}
		}

		return value;

	}