public static Method getAsMethodOfPublicBase(Class<?> c, Method m){
    for(Class<?> iface : c.getInterfaces()){
      for(Method im : iface.getMethods()){
        if(isMatch(im, m)){
          return im;
        }
      }
    }
    Class<?> sc = c.getSuperclass();
    if(sc == null){
      return null;
    }
    for(Method scm : sc.getMethods()){
      if(isMatch(scm, m)){
        return scm;
      }
    }
    return getAsMethodOfPublicBase(sc, m);
  }