public static AbstractReportGenerator generateHtml5Report ( ) { AbstractReportGenerator report ; try { Class < ? > aClass = new ReportGenerator ( ) . getClass ( ) . getClassLoader ( ) . loadClass ( "com.tngtech.jgiven.report.html5.Html5ReportGenerator" ) ; report = ( AbstractReportGenerator ) aClass . newInstance ( ) ; } catch ( ClassNotFoundException e ) { throw new JGivenInstallationException ( "The JGiven HTML5 Report Generator seems not to be on the classpath.\n" + "Ensure that you have a dependency to jgiven-html5-report." ) ; } catch ( Exception e ) { throw new JGivenInternalDefectException ( "The HTML5 Report Generator could not be instantiated." , e ) ; } return report ; }
Searches the Html5ReportGenerator in Java path and instantiates the report