code: private static String getFieldData(Field root, Object instance, int depth)
        throws IllegalAccessException {
      StringBuilder result = new StringBuilder("");
      root.setAccessible(true);
      result
          .append(spaces(depth))
          .append("(")
          .append(root.getType().getSimpleName())
          .append(getGenericTypeData(root.getGenericType()))
          .append(") ")
          .append(root.getName())
          .append(" = ")
          .append(root.get(instance))
          .append("\n");
      return result.toString();
    }
docs: Extract the type (and generic type parameters) and value for a given field.