List<SourceFolder> (@NotNull Set<? extends JpsModuleSourceRootType<?>> rootTypes) { List<SourceFolder> folders = new SmartList<>(); for (JpsSourceFolder folder : mySourceFolders) { if (rootTypes.contains(folder.getRootType())) { folders.add(folder); } } return folders; }