code: private boolean methodThrowsException(Method method,
              Class<? extends Exception> exceptionType) {
  
          // Check whether the method throws an exception of the specified type
          for (Class<?> thrownType : method.getExceptionTypes()) {
              if (exceptionType.isAssignableFrom(thrownType))
                  return true;
          }
  
          // No such exception is declared to be thrown
          return false;
          
      }
docs: Returns whether the given method throws the specified exception type,
  including any subclasses of that type.
  
  @param method
  The method to test.
  
  @param exceptionType
  The exception type to test for.
  
  @return
  true if the given method throws an exception of the specified type,
  false otherwise.