Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Detect private methods
for (Method method : clazz.getDeclaredMethods()) {
if (method != null) {
try {
clazz.getMethod(method.getName(), method.getParameterTypes());
} catch (NoSuchMethodException e) {
logger.warn("non-public method: " + method.getDeclaringClass().getName() + "." + method.getName() + "()");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.