* @param clazz The class for which to retrieve the methods.
*
* @return Returns the declared methods for this class.
*/
public static Method[] getDeclaredMethods(Class<?> clazz) {
GetDeclaredMethods action = GetDeclaredMethods.action( clazz );
final Method[] methods;
if ( System.getSecurityManager() != null ) {
methods = AccessController.doPrivileged( action );
}
else {
methods = action.run();
}
return methods;
}