private Method getMethod(Class<?> clazz, String method, Class<?>... params) {
            try {
                return clazz.getMethod(method, params);
            } catch (Exception e) {
                throw new RuntimeException(
                    "unable to get method: " + clazz + "." + method, e);
            }
        }