Class JacocoReportOperation


public class JacocoReportOperation extends AbstractOperation<JacocoReportOperation>
Generates JaCoCo reports.
Since:
1.0
Author:
Erik C. Thauvin
  • Constructor Details

    • JacocoReportOperation

      public JacocoReportOperation()
  • Method Details

    • classFiles

      public JacocoReportOperation classFiles(File... classFiles)
      Sets the locations of Java class files.
      Parameters:
      classFiles - the class files
      Returns:
      this operation instance
      See Also:
    • classFiles

      public JacocoReportOperation classFiles(String... classFiles)
      Sets the locations of Java class files.
      Parameters:
      classFiles - the class files
      Returns:
      this operation instance
      See Also:
    • classFiles

      public JacocoReportOperation classFiles(Path... classFiles)
      Sets the locations of Java class files.
      Parameters:
      classFiles - the class files
      Returns:
      this operation instance
      See Also:
    • classFiles

      public Collection<File> classFiles()
      Returns the locations of Java class files.
      Returns:
      the class files
    • classFiles

      public JacocoReportOperation classFiles(Collection<File> classFiles)
      Sets the locations of Java class files.
      Parameters:
      classFiles - the class files
      Returns:
      this operation instance
      See Also:
    • classFilesPaths

      public JacocoReportOperation classFilesPaths(Collection<Path> classFiles)
      Sets the locations of Java class files.
      Parameters:
      classFiles - the class files
      Returns:
      this operation instance
      See Also:
    • classFilesStrings

      public JacocoReportOperation classFilesStrings(Collection<String> classFiles)
      Sets the locations of Java class files.
      Parameters:
      classFiles - the class files
      Returns:
      this operation instance
      See Also:
    • csv

      public JacocoReportOperation csv(File csv)
      Sets the location of the CSV report.
      Parameters:
      csv - the report location
      Returns:
      this operation instance
    • csv

      public JacocoReportOperation csv(String csv)
      Sets the location of the CSV report.
      Parameters:
      csv - the report location
      Returns:
      this operation instance
    • csv

      public JacocoReportOperation csv(Path csv)
      Sets the location of the CSV report.
      Parameters:
      csv - the report location
      Returns:
      this operation instance
    • destFile

      public JacocoReportOperation destFile(File destFile)
      Sets the file to write execution data to.
      Parameters:
      destFile - the file
      Returns:
      this operation instance
    • destFile

      public JacocoReportOperation destFile(String destFile)
      Sets the file to write execution data to.
      Parameters:
      destFile - the file
      Returns:
      this operation instance
    • destFile

      public JacocoReportOperation destFile(Path destFile)
      Sets the file to write execution data to.
      Parameters:
      destFile - the file
      Returns:
      this operation instance
    • encoding

      public JacocoReportOperation encoding(String encoding)
      Sets the source file encoding. The platform encoding is used by default.
      Parameters:
      encoding - the encoding
      Returns:
      this operation instance
    • execFiles

      public JacocoReportOperation execFiles(File... execFiles)
      Sets the locations of the JaCoCo *.exec files to read.
      Parameters:
      execFiles - the exec files
      Returns:
      this operation instance
      See Also:
    • execFiles

      public JacocoReportOperation execFiles(String... execFiles)
      Sets the locations of the JaCoCo *.exec files to read.
      Parameters:
      execFiles - the exec files
      Returns:
      this operation instance
      See Also:
    • execFiles

      public JacocoReportOperation execFiles(Path... execFiles)
      Sets the locations of the JaCoCo *.exec files to read.
      Parameters:
      execFiles - the exec files
      Returns:
      this operation instance
      See Also:
    • execFiles

      public JacocoReportOperation execFiles(Collection<File> execFiles)
      Sets the locations of the JaCoCo *.exec files to read.
      Parameters:
      execFiles - the exec files
      Returns:
      this operation instance
      See Also:
    • execFiles

      public Collection<File> execFiles()
      Returns the locations of the JaCoCo *.exec files to read.
      Returns:
      the exec files
    • execFilesPaths

      public JacocoReportOperation execFilesPaths(Collection<Path> execFiles)
      Sets the locations of the JaCoCo *.exec files to read.
      Parameters:
      execFiles - the exec files
      Returns:
      this operation instance
      See Also:
    • execFilesStrings

      public JacocoReportOperation execFilesStrings(Collection<String> execFiles)
      Sets the locations of the JaCoCo *.exec files to read.
      Parameters:
      execFiles - the exec files
      Returns:
      this operation instance
      See Also:
    • execute

      public void execute() throws Exception
      Performs the operation execution that can be wrapped by the #executeOnce call.
      Specified by:
      execute in class AbstractOperation<JacocoReportOperation>
      Throws:
      Exception
    • fromProject

      public JacocoReportOperation fromProject(BaseProject project)
      Configure the operation from a BaseProject.
      Parameters:
      project - the project
      Returns:
      this operation instance
    • html

      public JacocoReportOperation html(File html)
      Sets the location of the HTML report.
      Parameters:
      html - the html
      Returns:
      this operation instance
    • html

      public JacocoReportOperation html(String html)
      Sets the location of the HTML report.
      Parameters:
      html - the html
      Returns:
      this operation instance
    • html

      public JacocoReportOperation html(Path html)
      Sets the location of the HTML report.
      Parameters:
      html - the html
      Returns:
      this operation instance
    • name

      public JacocoReportOperation name(String name)
      Sets the name used for the report.
      Parameters:
      name - the name
      Returns:
      this operation instance
    • quiet

      public JacocoReportOperation quiet(boolean quiet)
      Suppresses all output.
      Parameters:
      quiet - true or false
      Returns:
      this operation instance
    • sourceFiles

      public JacocoReportOperation sourceFiles(File... sourceFiles)
      Sets the locations of the source files. (e.g., src/main/java)
      Parameters:
      sourceFiles - the source files
      Returns:
      this operation instance
      See Also:
    • sourceFiles

      public JacocoReportOperation sourceFiles(String... sourceFiles)
      Sets the locations of the source files. (e.g., src/main/java)
      Parameters:
      sourceFiles - the source files
      Returns:
      this operation instance
      See Also:
    • sourceFiles

      public JacocoReportOperation sourceFiles(Path... sourceFiles)
      Sets the locations of the source files. (e.g., src/main/java)
      Parameters:
      sourceFiles - the source files
      Returns:
      this operation instance
      See Also:
    • sourceFiles

      public JacocoReportOperation sourceFiles(Collection<File> sourceFiles)
      Sets the locations of the source files. (e.g., src/main/java)
      Parameters:
      sourceFiles - the source files
      Returns:
      this operation instance
      See Also:
    • sourceFiles

      public Collection<File> sourceFiles()
      Returns the locations of the source files.
      Returns:
      the source files
    • sourceFilesPaths

      public JacocoReportOperation sourceFilesPaths(Collection<Path> sourceFiles)
      Sets the locations of the source files. (e.g., src/main/java)
      Parameters:
      sourceFiles - the source files
      Returns:
      this operation instance
      See Also:
    • sourceFilesStrings

      public JacocoReportOperation sourceFilesStrings(Collection<String> sourceFiles)
      Sets the locations of the source files. (e.g., src/main/java)
      Parameters:
      sourceFiles - the source files
      Returns:
      this operation instance
      See Also:
    • tabWidth

      public JacocoReportOperation tabWidth(int tabWidth)
      Sets the tab stop width for the source pages. Default is 4.
      Parameters:
      tabWidth - the tab width
      Returns:
      this operation instance
    • xml

      public JacocoReportOperation xml(File xml)
      Sets the location of the XML report.
      Parameters:
      xml - the report location
      Returns:
      this operation instance
    • xml

      public JacocoReportOperation xml(String xml)
      Sets the location of the XML report.
      Parameters:
      xml - the report location
      Returns:
      this operation instance
    • xml

      public JacocoReportOperation xml(Path xml)
      Sets the location of the XML report.
      Parameters:
      xml - the report location
      Returns:
      this operation instance