code: protected Object convertValueToRequiredType(Object value, Class requiredType) {
          if (String.class.equals(this.requiredType)) {
              return value.toString();
          } else if (Number.class.isAssignableFrom(this.requiredType)) {
              if (value instanceof Number) {
                  // Convert original Number to target Number class.
                  return NumberUtils.convertNumberToTargetClass(((Number) value), this.requiredType);
              } else {
                  // Convert stringified value to target Number class.
                  return NumberUtils.parseNumber(value.toString(), this.requiredType);
              }
          } else {
              throw new IllegalArgumentException(
                      "Value [" + value + "] is of type [" + value.getClass().getName() +
                              "] and cannot be converted to required type [" + this.requiredType.getName() + "]");
          }
      }
docs: Convert the given column value to the specified required type.
  Only called if the extracted column value does not match already.
  <p>If the required type is String, the value will simply get stringified
  via <code>toString()</code>. In case of a Number, the value will be
  converted into a Number, either through number conversion or through
  String parsing (depending on the value type).
  
  @param value        the column value as extracted from <code>getColumnValue()</code>
  (never <code>null</code>)
  @param requiredType the type that each result object is expected to match
  (never <code>null</code>)
  @return the converted value
  @see #getColumnValue(java.sql.ResultSet,int,Class)