public List<JCCompilationUnit> parseFiles(Iterable<JavaFileObject> fileObjects){
  if (shouldStop(CompileState.PARSE))   return List.nil();
  ListBuffer<JCCompilationUnit> trees=new ListBuffer<>();
  Set<JavaFileObject> filesSoFar=new HashSet<JavaFileObject>();
  for (  JavaFileObject fileObject : fileObjects) {
    if (!filesSoFar.contains(fileObject)) {
      filesSoFar.add(fileObject);
      trees.append(parse(fileObject));
    }
  }
  return trees.toList();
}

public List < JCCompilationUnit > parseFiles ( Iterable < JavaFileObject > fileObjects ) { if ( shouldStop ( CompileState . PARSE ) ) return List . nil ( ) ; ListBuffer < JCCompilationUnit > trees = new ListBuffer < > ( ) ; Set < JavaFileObject > filesSoFar = new HashSet < JavaFileObject > ( ) ; for ( JavaFileObject fileObject : fileObjects ) { if ( ! filesSoFar . contains ( fileObject ) ) { filesSoFar . add ( fileObject ) ; trees . append ( parse ( fileObject ) ) ; } } return trees . toList ( ) ; }
parses a list of files .
