Here you can find the source of getMethodSignature(Method method)
public static String getMethodSignature(Method method)
//package com.java2s; //License from project: Apache License import java.lang.reflect.Method; public class Main { public static String getMethodSignature(Method method) { String genericString = method.toGenericString(); String declaringClassName = method.getDeclaringClass().getName(); int a = genericString.indexOf(" " + declaringClassName + "."); int b = genericString.lastIndexOf(')'); return genericString.substring(a + declaringClassName.length() + 2, b + 1); }//w ww . j a v a 2 s. c o m }