code: static public <E> E convert(String s, Class<E> type) throws ConversionException {
          // if enum, handle differently
          if (type.isEnum()) {
              Object obj = ClassUtil.findEnumConstant(type, s);
              if (obj == null) {
                  throw new ConversionException("Invalid constant [" + s + "] used, supported values [" + toListString(type.getEnumConstants()) + "]");
              }
              return (E)obj;
          // else, handle normally
          } else {
              TypeConverter converter = REGISTRY.get(type);
  
              if (converter == null) {
                  throw new ConversionException("The type [" + type.getSimpleName() + "] is not supported");
              }
  
              return (E)converter.convert(s);
          }
      }
docs: Converts the string value into an Object of the Class type. Will either
  delegate conversion to a PropertyConverter or will handle creating enums
  directly.
  
  @param string0 The string value to convert
  @param type The Class type to convert it into
  @return A new Object converted from the String value