/** * Compares the signatures of two methods to see if they * have the same method name, parameters, and return type. * * Note that this equality check does NOT cover : * 1) declaring class 2) exceptions * */ public static boolean sameMethodSignature(Method m1, Method m2) { boolean same = false; if(m1.getName().equals(m2.getName())) { same = sameParamTypes(m1, m2) && sameReturnTypes(m1, m2); } return same; }
/** * Compares the signatures of two methods to see if they * have the same method name, parameters, and return type. * * Note that this equality check does NOT cover : * 1) declaring class 2) exceptions * */ public static boolean sameMethodSignature(Method m1, Method m2) { boolean same = false; if(m1.getName().equals(m2.getName())) { same = sameParamTypes(m1, m2) && sameReturnTypes(m1, m2); } return same; }