public static @Nullable File getAnnotationProcessorGeneratedSourcesOutputDir(JpsModule module, final boolean forTests, ProcessorConfigProfile profile) {
    final String sourceDirName = profile.getGeneratedSourcesDirectoryName(forTests);
    if (profile.isOutputRelativeToContentRoot()) {
      List<String> roots = module.getContentRootsList().getUrls();
      if (roots.isEmpty()) {
        return null;
      }
      if (roots.size() > 1) {
        roots = new ArrayList<>(roots); // sort roots to get deterministic result
        roots.sort(Comparator.naturalOrder());
      }
      final File parent = JpsPathUtil.urlToFile(roots.get(0));
      return StringUtil.isEmpty(sourceDirName)? parent : new File(parent, sourceDirName);
    }

    final File outputDir = getModuleOutputDir(module, forTests);
    if (outputDir == null) {
      return null;
    }
    return StringUtil.isEmpty(sourceDirName)? outputDir : new File(outputDir, sourceDirName);
  }
public static @Nullable File getAnnotationProcessorGeneratedSourcesOutputDir(JpsModule module, final boolean forTests, ProcessorConfigProfile profile)