diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-03-09 00:09:25 +0100 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-03-09 00:09:25 +0100 |
commit | 99aa59f2da2dd1f1ec970fca6b143b03a83cb048 (patch) | |
tree | 8d8b9f39b1bf783e3e25eb8c044e5dd969692c8e /sonar-plugin-api | |
parent | c381af0a05f37a85fad36ff9a2578542a642254d (diff) | |
download | sonarqube-99aa59f2da2dd1f1ec970fca6b143b03a83cb048.tar.gz sonarqube-99aa59f2da2dd1f1ec970fca6b143b03a83cb048.zip |
add the method ProjectUtils.toIoFiles(..)
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectUtils.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectUtils.java index f2f9b0511e4..bf89e3f8d6a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ProjectUtils.java @@ -19,6 +19,11 @@ */ package org.sonar.api.resources; +import com.google.common.collect.Lists; + +import java.util.Collection; +import java.util.List; + /** * @TODO Actually this class incorrectly named, because provides information not about project, but about Java project. * And seems that only core plugins use this class. @@ -52,4 +57,15 @@ public final class ProjectUtils { } return null; } + + /** + * @since 2.7 + */ + public static List<java.io.File> toIoFiles(Collection<InputFile> inputFiles) { + List<java.io.File> files = Lists.newArrayList(); + for (InputFile inputFile : inputFiles) { + files.add(inputFile.getFile()); + } + return files; + } } |