code: private String getTypeGenericName(Type type)
      {
          StringBuilder sb = new StringBuilder(getTypeName(type));
  
          if (type instanceof ParameterizedType) {
              ParameterizedType parameterizedType = (ParameterizedType) type;
  
              Type[] generics = parameterizedType.getActualTypeArguments();
              if (generics.length > 0) {
                  sb.append('<');
                  for (int i = 0; i < generics.length; ++i) {
                      if (i > 0) {
                          sb.append(',');
                      }
                      sb.append(getTypeGenericName(generics[i]));
                  }
                  sb.append('>');
              }
          }
  
          return sb.toString();
      }
docs: Get type name.
  
  @param type the type
  @return type name