private boolean throwsException(Method method,Class<?> exception){
  Class exs[]=method.getExceptionTypes();
  for (int i=0; i < exs.length; i++) {
    if (exs[i] == exception) {
      return true;
    }
  }
  return false;
}

private boolean throwsException ( Method method , Class < ? > exception ) { Class exs [ ] = method . getExceptionTypes ( ) ; for ( int i = 0 ; i < exs . length ; i ++ ) { if ( exs [ i ] == exception ) { return true ; } } return false ; }
return true iff the given method throws the given exception .
