private void populateClassesToCompile(final BlockingQueue<NativeCodeFile> classesToCompile)
      throws MojoExecutionException {
    for (NativeCodeFile codeFile : allCodeFiles) {
      if (compiler.fileNeedsToBeCompiled(codeFile)) {
        try {
          classesToCompile.put(codeFile);
        } catch (InterruptedException e) {
          throw new MojoExecutionException(
              "Failed to add "
                  + codeFile.getSourceFile().toString()
                  + " to list of classes to compile.",
              e);
        }
      }
    }

    for (CompilationProcessor processor : processors) processor.setClassListingIsComplete(true);

    log.debug("Done populating classes to compile.");
  }
  private AbstractMojoExecutionException getAnyExceptionInProcessors() {
    for (CompilationProcessor processor : processors)
      if (processor.getCaughtException() != null) return processor.getCaughtException();

    return null;
  }
  private boolean processorsAreAlive() {
    for (CompilationProcessor processor : processors) if (!processor.isDone()) return true;

    return false;
  }
 private void abortAllProcessors() {
   for (CompilationProcessor processor : processors) processor.abort();
 }