private File getSingleOutputDirectory(final Location loc, final JavaFileObject sourceFile) {
    if (loc == StandardLocation.CLASS_OUTPUT) {
      if (myOutputsMap.size() > 1 && sourceFile != null) {
        // multiple outputs case
        final File outputDir = findOutputDir(new File(Paths.toURI(sourceFile.toUri().getPath())));
        if (outputDir != null) {
          return outputDir;
        }
      }
    }

    final Iterable<? extends File> location = getStdManager().getLocation(loc);
    if (location != null) {
      final Iterator<? extends File> it = location.iterator();
      if (it.hasNext()) {
        return it.next();
      }
    }
    return null;
  }
Пример #2
0
 public void setProcessors(Iterable<? extends Processor> processors) {
   processors.getClass(); // null check
   // not mt-safe
   if (used.get()) throw new IllegalStateException();
   this.processors = processors;
 }