code: public static boolean methodEquals( Method method, Method other){
  	    
  		if ((method.getDeclaringClass().equals( other.getDeclaringClass()))
  	    && (method.getName().equals( other.getName()))) {
  	        if (!method.getReturnType().equals(other.getReturnType()))
  	            return false;
  	        
  	        Class<?>[] params1 = method.getParameterTypes();
  	        Class<?>[] params2 = other.getParameterTypes();
  	        if (params1.length == params2.length) {
  	            for (int i = 0; i < params1.length; i++) {
  	            if (params1[i] != params2[i])
  	                return false;
  	            }
  	            return true;
  	        }
  	    }
  	    return false;
  	}
docs: Checks if the 2 methods are equals.
  
  @param method the first method
  @param other the second method
  @return true if the 2 methods are equals