public static Set<Class> scan(String[] basePackages, Class<? extends Annotation>... annotations) { ClassScaner cs = new ClassScaner(); for (Class anno : annotations) cs.addIncludeFilter(new AnnotationTypeFilter(anno)); Set<Class> classes = new HashSet<Class>(); for (String s : basePackages) classes.addAll(cs.doScan(s)); return classes; }
public static Set<Class> scan(String basePackage, Class<? extends Annotation>... annotations) { ClassScaner cs = new ClassScaner(); for (Class anno : annotations) cs.addIncludeFilter(new AnnotationTypeFilter(anno)); return cs.doScan(basePackage); }