public static void init ( ) { reports . clear ( ) ; Reflections reflections = new Reflections ( REPORTS_PACKAGE ) ; final Set < Class < ? extends Report > > reportClasses = reflections . getSubTypesOf ( Report . class ) ; for ( Class < ? extends Report > c : reportClasses ) { LOG . info ( "Report class: " + c . getName ( ) ) ; try { reports . add ( c . newInstance ( ) ) ; } catch ( IllegalAccessException | InstantiationException e ) { LOG . error ( "Error while loading report implementation classes" , e ) ; } } if ( LOG . isInfoEnabled ( ) ) { LOG . info ( String . format ( "Detected %s reports" , reports . size ( ) ) ) ; } }
Initializes the set of report implementation .