예제 #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);
 }