class ScenarioBeanUtil {

    public static String revertValue(Object cleanValue) {
        if (cleanValue == null) {
            return "null";
        }

        Class<?> clazz = cleanValue.getClass();

        if (clazz.isAssignableFrom(String.class)) {
            return String.valueOf(cleanValue);
        } else if (clazz.isAssignableFrom(Boolean.class) || clazz.isAssignableFrom(boolean.class)) {
            return Boolean.toString((Boolean) cleanValue);
        } else if (clazz.isAssignableFrom(Integer.class) || clazz.isAssignableFrom(int.class)) {
            return Integer.toString((Integer) cleanValue);
        } else if (clazz.isAssignableFrom(Long.class) || clazz.isAssignableFrom(long.class)) {
            return Long.toString((Long) cleanValue);
        } else if (clazz.isAssignableFrom(Double.class) || clazz.isAssignableFrom(double.class)) {
            return revertDouble((Double) cleanValue);
        } else if (clazz.isAssignableFrom(Float.class) || clazz.isAssignableFrom(float.class)) {
            return cleanValue + "f";
        } else if (clazz.isAssignableFrom(Character.class) || clazz.isAssignableFrom(char.class)) {
            return String.valueOf(cleanValue);
        } else if (clazz.isAssignableFrom(Byte.class) || clazz.isAssignableFrom(byte.class)) {
            return String.valueOf(cleanValue);
        } else if (clazz.isAssignableFrom(Short.class) || clazz.isAssignableFrom(short.class)) {
            return String.valueOf(cleanValue);
        } else if (clazz.isAssignableFrom(LocalDate.class)) {
            LocalDate localDate = (LocalDate) cleanValue;
            return String.format("%04d-%02d-%02d", localDate.getYear(), localDate.getMonthValue(), localDate.getDayOfMonth());
        } else if (Enum.class.isAssignableFrom(clazz)) {
            return String.valueOf(cleanValue);
        } else {
            return String.valueOf(cleanValue);
        }
    }

    private  ScenarioBeanUtil();

}