code: public static String getMethodDescriptor(final Method m) {
          Class<?>[] parameters = m.getParameterTypes();
          StringBuffer buf = new StringBuffer();
          buf.append('(');
          for (int i = 0; i < parameters.length; ++i) {
              getDescriptor(buf, parameters[i]);
          }
          buf.append(')');
          getDescriptor(buf, m.getReturnType());
          return buf.toString();
      }
docs: Returns the descriptor corresponding to the given method.
  
  @param m
  a {@link Method Method} object.
  @return the descriptor of the given method.