Class ReportSupport.SourceFileCollection

java.lang.Object
org.jacoco.maven.ReportSupport.SourceFileCollection
All Implemented Interfaces:
ISourceFileLocator
Enclosing class:
ReportSupport

private class ReportSupport.SourceFileCollection extends Object implements ISourceFileLocator
  • Field Details

    • sourceRoots

      private final List<File> sourceRoots
    • encoding

      private final String encoding
  • Constructor Details

    • SourceFileCollection

      public SourceFileCollection(org.apache.maven.project.MavenProject project, String encoding)
  • Method Details

    • getSourceFile

      public Reader getSourceFile(String packageName, String fileName) throws IOException
      Description copied from interface: ISourceFileLocator
      Tries to locate the given source file and opens a reader with the appropriate encoding.
      Specified by:
      getSourceFile in interface ISourceFileLocator
      Parameters:
      packageName - VM name of the package
      fileName - name of the source file
      Returns:
      reader if the file could be located, null otherwise
      Throws:
      IOException - in case of problems while opening the file
    • getTabWidth

      public int getTabWidth()
      Description copied from interface: ISourceFileLocator
      Returns number of blank characters that represent a tab in source code.
      Specified by:
      getTabWidth in interface ISourceFileLocator
      Returns:
      tab width as number of blanks