*
* @return Returns the declared method with the specified name or {@code null} if it does not exist.
*/
public static Method getDeclaredMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes) {
Method method;
GetDeclaredMethod action = GetDeclaredMethod.action( clazz, methodName, parameterTypes );
if ( System.getSecurityManager() != null ) {
method = AccessController.doPrivileged( action );
}
else {
method = action.run();
}
return method;
}