From 3c76759c6c43f360bc721bedfa3abe12b83275da Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Mon, 12 Sep 2016 19:32:17 +0300 Subject: [PATCH] Cleanup (dead code; docs; formatting) --- .../src/org/jetbrains/jps/ProjectPaths.java | 33 +++++++------------ 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/jps/jps-builders/src/org/jetbrains/jps/ProjectPaths.java b/jps/jps-builders/src/org/jetbrains/jps/ProjectPaths.java index 0e041dc62e64..6419766f2091 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/ProjectPaths.java +++ b/jps/jps-builders/src/org/jetbrains/jps/ProjectPaths.java @@ -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 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 getClasspathFiles(ModuleChunk chunk, - JpsJavaClasspathKind kind, - final boolean excludeMainModuleOutput, - ClasspathPart classpathPart, final boolean exportedOnly) { + JpsJavaClasspathKind kind, + boolean excludeMainModuleOutput, + ClasspathPart classpathPart, + boolean exportedOnly) { final Set files = new LinkedHashSet(); 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 getSourceRootsWithDependents(ModuleChunk chunk) { @@ -152,10 +150,6 @@ public class ProjectPaths { return sourcePaths; } - public static Set 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 processor) { JpsJavaExtensionService.getInstance().enumerateDependencies(chunk.getModules()).includedIn(kind).recursively().processModules(processor); } @@ -234,14 +228,11 @@ public class ProjectPaths { } private static class ModuleSourceElementsFilter implements Condition { - - private ModuleSourceElementsFilter() { - } + private ModuleSourceElementsFilter() { } @Override public boolean value(JpsDependencyElement dependency) { return dependency instanceof JpsModuleDependency || dependency instanceof JpsModuleSourceDependency; } } - -} +} \ No newline at end of file