code: public static boolean indexClassFile(final Indexer indexer, final List<File> knownFiles, final File classFile) {
  
          if (knownFiles.contains(classFile)) {
              return false;
          }
  
          knownFiles.add(classFile);
          try (final InputStream in = classFile.toURI().toURL().openStream()) {
              indexer.index(in);
          } catch (final IOException ex) {
              throw new RuntimeException("Error indexing file: " + classFile, ex);
          }
          return true;
  
      }
docs: Indexes a single file, except it was already analyzed.
  
  @param indexer
  Indexer to use.
  @param knownFiles
  List of files already analyzed. New files will be added within this method.
  @param classFile
  Class file to analyze.
  
  @return TRUE if the file was indexed or FALSE if it was ignored.