public static List<File> findClassFiles(String parentPath, String[] filenames,
      boolean recursive) {
    // Grab classes and Expand directory names found in list
    List<File> classFiles = new ArrayList<>();
    for (final String filename : filenames) {
      File f = new File(parentPath + filename);
      String n = f.getAbsolutePath();
      if (!f.exists()) {
        System.err.println("File " + n + " does not exist - skipping");
        continue;
      }
      if (f.isFile() && f.getName().endsWith(".class")) {
        classFiles.add(f);
        continue;
      }
      if (f.isDirectory() && recursive) {
        classFiles.addAll(findClassFiles(f.getAbsolutePath() + "/", f.list(), true));
      }
    }
    Collections.sort(classFiles);
    return classFiles;
  }
returns a collection of all of the .class files in the given list of files and directories.

@param parentPath the path of the parent directory in which the files exist
@param filenames a list of the files and directories to examine
@param recursive whether to recurse into subdirectories
@return a sorted list of the .class files found
geode-junit/src/main/java/org/apache/geode/codeAnalysis/CompiledClassUtils.java