public static Set < Class < ? > > getAllAnnotatedClasses ( final String packagePath , final Class < ? extends Annotation > annotationClass ) throws ClassNotFoundException , IOException , URISyntaxException { final List < File > directories = ClassExtensions . getDirectoriesFromResources ( packagePath , true ) ; final Set < Class < ? > > classes = new HashSet <> ( ) ; for ( final File directory : directories ) { classes . addAll ( scanForAnnotatedClasses ( directory , packagePath , annotationClass ) ) ; } return classes ; }
Gets all annotated classes that belongs from the given package path and the given annotation class .