示例#1
0
 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;
 }
示例#2
0
 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);
 }