List<JpsDependencyElement> (JpsModule module, JpsJavaClasspathKind classpathKind, boolean exportedOnly) { final List<JpsDependencyElement> result = new ArrayList<>(); for (JpsDependencyElement dependencyElement : module.getDependenciesList().getDependencies()) { final JpsJavaDependencyExtension extension = getDependencyExtension(dependencyElement); if (extension == null || extension.getScope().isIncludedIn(classpathKind) && (!exportedOnly || extension.isExported())) { result.add(dependencyElement); } } return result; }