private static Method getMethod (Class<?> clazz, String method)
      {
        for (Method m : clazz.getMethods())
          {
            if (m.getName().equals(method))
              {
                return m;
              }
          }
        return null;
      }