Skip to content

Сканер аннотаций по пакетам (Package annotation scanner)

License

Notifications You must be signed in to change notification settings

kalenchukov/AnnotationScanning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Справка

AnnotationScanning

Сканер аннотаций по пакетам

Использование

AnnotationScanning annotationScanner = new AnnotationScanner();
annotationScanner.addPackage("dev.kalenchukov.annotation.scanning.tests.packages.films");
annotationScanner.addPackage("dev.kalenchukov.annotation.scanning.tests.packages.musics");
List<Class<?>> annotatedClasses = annotationScanner.findAnnotatedClasses(MyAnnotation.class);

for (Class<?> objectClass : annotatedClasses)
{
    System.out.println(objectClass.getName() + ".class");
}

Результат выполнения:

Film.class
Video.class
RockMusic.class
Music.class