public static boolean hasReturnType ( final Method method ) { if ( method == null ) { return false ; } if ( method . getReturnType ( ) == null ) { return false ; } if ( Void . class . equals ( method . getReturnType ( ) ) ) { return false ; } return ! Void . TYPE . equals ( method . getReturnType ( ) ) ; }
Defensive implemented method to determine if method has a return type .