public static < T > List < T > getWithAnnotatedClass ( Class annotationClass , String packages ) { return new ArrayList < T > ( ) { { addAll ( ClassGraphUtil . getWithAnnotatedClass ( annotationClass , packages ) ) ; } } ; }
Scan and get classes under certain annotation and initiate them . Note that we only scan for the default package .