code: static void analyzeDir(final Set<Class<?>> classes, final File baseDir, final File srcDir, final boolean recursive,
              final ClassFilter classFilter) {
  
          final FileProcessor fileProcessor = new FileProcessor(new FileHandler() {
              @Override
              public final FileHandlerResult handleFile(final File file) {
                  if (file.isDirectory()) {
                      // Directory
                      if (recursive) {
                          return FileHandlerResult.CONTINUE;
                      }
                      return FileHandlerResult.SKIP_SUBDIRS;
                  }
                  // File
                  final String name = file.getName();
                  if (name.endsWith(".java") && !name.equals("package-info.java")) {
                      final String packageName = Utils4J.getRelativePath(baseDir, file.getParentFile()).replace(File.separatorChar, '.');
                      final String simpleName = name.substring(0, name.length() - 5);
                      final String className = packageName + "." + simpleName;
                      final Class<?> clasz = classForName(className);
                      if (isInclude(clasz, classFilter)) {
                          classes.add(clasz);
                      }
                  }
                  return FileHandlerResult.CONTINUE;
              }
          });
  
          fileProcessor.process(srcDir);
  
      }
docs: Populates a list of classes from a given java source directory. All source files must have a ".class" file in the class path.
  
  @param classes
  Set to populate.
  @param baseDir
  Root directory like "src/main/java".
  @param srcDir
  A directory inside the root directory like "a/b/c" (path of the package "a.b.c").
  @param recursive
  If sub directories should be included <code>true</code> else <code>false</code>.
  @param classFilter
  Filter that decides if a class should have a corresponding test or not.