in hugegraph-common/src/main/java/org/apache/hugegraph/testutil/Whitebox.java [166:183]
public static Method method(Class<?> clazz, String methodName,
Class<?>[] argsClasses) {
try {
return clazz.getDeclaredMethod(methodName, argsClasses);
} catch (NoSuchMethodException e) {
Class<?> superclass = clazz.getSuperclass();
if (superclass != null) {
try {
return method(superclass, methodName, argsClasses);
} catch (Exception ignored) {
// pass
}
}
throw new RuntimeException(String.format(
"Can't find method '%s' with args %s of class '%s'",
methodName, Arrays.asList(argsClasses), clazz), e);
}
}