Package hudson.plugins.jacoco
Class JacocoReportDir
- java.lang.Object
-
- hudson.plugins.jacoco.JacocoReportDir
-
public class JacocoReportDir extends Object
Encapsulates the directory structure in $JENKINS_HOME where we store jacoco related files.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description JacocoReportDir(File rootDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExecFiles(Iterable<FilePath> execFiles)
File
getClassesDir()
Where we store *.class files, honoring package names as directories.List<File>
getExecFiles()
Lists up existing jacoco.exec files.File
getExecFilesDir()
Root directory that stores jacoco.exec files.File
getSourcesDir()
Where we store *.java files, honoring package names as directories.ExecutionFileLoader
parse(String[] includes, String... excludes)
Parses the saved "jacoco.exec" files into anExecutionFileLoader
.int
saveClassesFrom(FilePath dir, String fileMask)
int
saveSourcesFrom(FilePath dir, String inclusionMask, String exclusionMask)
String
toString()
-
-
-
Constructor Detail
-
JacocoReportDir
public JacocoReportDir(File rootDir)
-
-
Method Detail
-
getClassesDir
public File getClassesDir()
Where we store *.class files, honoring package names as directories.- Returns:
- Directory to which we store *.class files, honoring package names as directories.
-
saveClassesFrom
public int saveClassesFrom(@NonNull FilePath dir, @NonNull String fileMask) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
getSourcesDir
public File getSourcesDir()
Where we store *.java files, honoring package names as directories.- Returns:
- Directory to which we store *.java files, honoring package names as directories.
-
saveSourcesFrom
public int saveSourcesFrom(@NonNull FilePath dir, @NonNull String inclusionMask, @NonNull String exclusionMask) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
getExecFilesDir
public File getExecFilesDir()
Root directory that stores jacoco.exec files. Each exec file is stored in its own directory.- Returns:
- Directory that stores jacoco.exec files.
- See Also:
getExecFiles()
-
getExecFiles
public List<File> getExecFiles()
Lists up existing jacoco.exec files.- Returns:
- List of existing jacoco.exec files.
-
addExecFiles
public void addExecFiles(Iterable<FilePath> execFiles) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
parse
public ExecutionFileLoader parse(String[] includes, String... excludes) throws IOException
Parses the saved "jacoco.exec" files into anExecutionFileLoader
.- Parameters:
includes
- seeExecutionFileLoader.setIncludes(java.lang.String...)
excludes
- seeExecutionFileLoader.setExcludes(java.lang.String...)
- Returns:
- the configured
ExecutionFileLoader
- Throws:
IOException
- if any I/O error occurs
-
-