code: public static <T extends Serializable> T getParsedValue(
              Class<T> returnType, String value,
              java.text.DateFormat dateFormatter) throws ParseException {
          SerializableFormat<T> formatter = (SerializableFormat<T>) parseableTypes
                  .get(returnType);
  
          if (formatter == null) {
              throw new IllegalArgumentException("Unknown return type");
          }
  
          ParserContextImpl ctx = new ParserContextImpl();
          ctx.setAttribute("format", dateFormatter);
  
          return formatter.parse(value, ctx);
      }
docs: Returns the parsed object of the given type for the given string. Based
  on the registered #{@link SerializableFormat}s an instance is choosen
  based on the class object. The parsing of the string value may fail,
  throwing a ParseException.
  
  @param returnType    The type to which the value should be parsed
  @param value         The string that should be parsed
  @param dateFormatter The date format which should be used for string to
  date/calendar conversion
  @return The parsed object
  @throws ParseException Is thrown when the string can not be parsed
  @see ReflectionUtils#isParseableType(java.lang.Class)