code: private static String typeShortName(Class<?> type) {
  
      if (type.isPrimitive()) {
        return type.getName();
      } else if (type == File.class || type == Path.class) {
        return "filename";
      } else if (type == Pattern.class) {
        return "regex";
      } else if (type.isEnum()) {
        return "enum";
      } else {
        return type.getSimpleName().toLowerCase();
      }
    }
docs: Return a short name for the specified type for use in messages. This is usually the lowercase
  simple name of the type, but there are special cases (for files, regular expressions, enums,
  ...).
  
  @param type the type whoso short name to return
  @return a short name for the specified type for use in messages