code: public static String toMethodDescriptor(Method method, boolean ignoreFirstParameter) {
  		Class<?>[] params = method.getParameterTypes();
  		if (ignoreFirstParameter && params.length < 1) {
  			throw new IllegalStateException("Cannot ignore the first parameter when there are none.  method=" + method);
  		}
  		StringBuilder s = new StringBuilder();
  		if (!ignoreFirstParameter) {
  			s.append("(");
  		}
  		for (int i = (ignoreFirstParameter ? 1 : 0), max = params.length; i < max; i++) {
  			appendDescriptor(params[i], s);
  		}
  		s.append(")");
  		appendDescriptor(method.getReturnType(), s);
  		return s.toString();
  	}
docs: Construct the method descriptor for a method. For example 'String bar(int)' would return '(I)Ljava/lang/String;'.
  If the first parameter is skipped, the leading '(' is also skipped (the caller is expect to build the right
  prefix).
  
  @param method method for which the descriptor should be created
  @param ignoreFirstParameter whether to include the first parameter in the output descriptor
  @return a method descriptor