code: protected List<File> getClassFiles(File root, File parent) {
  
          if (root == null || !root.isDirectory()) {
              return null;
          }
  
          List<File> fileList = new ArrayList<File>();
  
          File[] files = root.listFiles();
          for (int i = 0; files != null && i < files.length; i++) {
              if (files[i].isDirectory()) {
                  List<File> subdirFiles = getClassFiles(files[i], parent);
                  if (subdirFiles != null) {
                      fileList.addAll(subdirFiles);
                  }
              } else if (files[i].getName().endsWith(".class")) {
                  fileList.add(files[i]);
              }
          }
  
          return fileList;
      }
docs: Recursively search the specified directory for class files.
  
  @param root the directory to search.
  @param parent the parent directory in the recursion or null if
  processing the top level directory.
  
  @return the list of files found that are likely to be class files.