Cleanup (dead code; docs; formatting)
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>
Mon, 12 Sep 2016 16:32:17 +0000 (19:32 +0300)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Mon, 12 Sep 2016 16:32:17 +0000 (19:32 +0300)
jps/jps-builders/src/org/jetbrains/jps/ProjectPaths.java

index 0e041dc62e64ca533d935918ff8953bad0d4f3b2..6419766f2091ebada3b1c4aa366123e80fe97252 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2012 JetBrains s.r.o.
+ * Copyright 2000-2016 JetBrains s.r.o.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -36,14 +36,13 @@ import java.util.*;
  *         Date: 9/30/11
  */
 public class ProjectPaths {
-  private ProjectPaths() {
-  }
+  private ProjectPaths() { }
 
   @NotNull
   public static Collection<File> getCompilationClasspathFiles(ModuleChunk chunk,
-                                                       boolean includeTests,
-                                                       final boolean excludeMainModuleOutput,
-                                                       final boolean exportedOnly) {
+                                                              boolean includeTests,
+                                                              boolean excludeMainModuleOutput,
+                                                              boolean exportedOnly) {
     return getClasspathFiles(chunk, JpsJavaClasspathKind.compile(includeTests), excludeMainModuleOutput, ClasspathPart.WHOLE, exportedOnly);
   }
 
@@ -65,9 +64,10 @@ public class ProjectPaths {
 
   @NotNull
   private static Collection<File> getClasspathFiles(ModuleChunk chunk,
-                                             JpsJavaClasspathKind kind,
-                                             final boolean excludeMainModuleOutput,
-                                             ClasspathPart classpathPart, final boolean exportedOnly) {
+                                                    JpsJavaClasspathKind kind,
+                                                    boolean excludeMainModuleOutput,
+                                                    ClasspathPart classpathPart,
+                                                    boolean exportedOnly) {
     final Set<File> files = new LinkedHashSet<File>();
     for (JpsModule module : chunk.getModules()) {
       JpsJavaDependenciesEnumerator enumerator = JpsJavaExtensionService.dependencies(module).includedIn(kind).recursively();
@@ -108,9 +108,7 @@ public class ProjectPaths {
   }
 
   /**
-   *
-   * @param chunk
-   * @return mapping "sourceRoot" -> "package prefix" Package prefix uses slashes instead of dots and ends with trailing slash
+   * Returns a mapping "sourceRoot" -> "package prefix". A package prefix uses slashes instead of dots and ends with a trailing slash.
    */
   @NotNull
   public static Map<File, String> getSourceRootsWithDependents(ModuleChunk chunk) {
@@ -152,10 +150,6 @@ public class ProjectPaths {
     return sourcePaths;
   }
 
-  public static Set<JpsModule> getModulesWithDependentsRecursively(final JpsModule module, final boolean includeTests) {
-    return JpsJavaExtensionService.dependencies(module).includedIn(JpsJavaClasspathKind.compile(includeTests)).recursively().getModules();
-  }
-
   private static void processModulesRecursively(ModuleChunk chunk, JpsJavaClasspathKind kind, Consumer<JpsModule> processor) {
     JpsJavaExtensionService.getInstance().enumerateDependencies(chunk.getModules()).includedIn(kind).recursively().processModules(processor);
   }
@@ -234,14 +228,11 @@ public class ProjectPaths {
   }
 
   private static class ModuleSourceElementsFilter implements Condition<JpsDependencyElement> {
-
-    private ModuleSourceElementsFilter() {
-    }
+    private ModuleSourceElementsFilter() { }
 
     @Override
     public boolean value(JpsDependencyElement dependency) {
       return dependency instanceof JpsModuleDependency || dependency instanceof JpsModuleSourceDependency;
     }
   }
-
-}
+}
\ No newline at end of file