code: public static String toStringMethod(final Method method, final Map<String, Type> generics) {
          return String.format("%s %s(%s)",
                  toStringType(method.getGenericReturnType(), generics),
                  method.getName(),
                  toStringTypes(method.getGenericParameterTypes(), generics));
      }
docs: <pre>{@code class B extends A<Long> {}
  class A<T> {
  List<T> get(T one);
  }
  
  Method method = A.class.getMethod("get", Object.class);
  Map<String, Type> generics = (context of B).method().visibleGenericsMap();
  TypeToStringUtils.toStringMethod(method, generics) == "List<Long> get(Long)"
  }</pre>.
  
  @param method   method
  @param generics required generics (type generics and possible method generics)
  @return method string with replaced generic variables
  @see ru.vyarus.java.generics.resolver.util.map.PrintableGenericsMap to print not known generic names
  @see ru.vyarus.java.generics.resolver.util.map.IgnoreGenericsMap to print Object instead of not known generic