code: public InputFile getNextFile() {
      for (Iterator<String> iter = queuedNames.iterator(); iter.hasNext(); ) {
        String name = iter.next();
        iter.remove();
        processedNames.add(name);
        InputFile file = getFileForName(name);
        if (file != null) {
          return file;
        }
      }
      return null;
    }
docs: Returns the next Java source file to be processed. Returns null if the
  queue is empty.