Created
February 20, 2012 10:06
-
-
Save liweinan/1868652 to your computer and use it in GitHub Desktop.
Detect private methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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