Class FileFilter

java.lang.Object
org.jacoco.maven.FileFilter

public class FileFilter extends Object
A file filter using includes/excludes patterns.
  • Field Details

  • Constructor Details

    • FileFilter

      public FileFilter(List<String> includes, List<String> excludes)
      Construct a new FileFilter
      Parameters:
      includes - list of includes patterns
      excludes - list of excludes patterns
  • Method Details

    • getFileNames

      public List<String> getFileNames(File directory) throws IOException
      Returns a list of file names.
      Parameters:
      directory - the directory to scan
      Returns:
      a list of files
      Throws:
      IOException - if file system access fails
    • getFiles

      public List<File> getFiles(File directory) throws IOException
      Returns a list of files.
      Parameters:
      directory - the directory to scan
      Returns:
      a list of files
      Throws:
      IOException - if file system access fails
    • getIncludes

      public String getIncludes()
      Get the includes pattern
      Returns:
      the pattern
    • getExcludes

      public String getExcludes()
      Get the excludes pattern
      Returns:
      the pattern
    • buildPattern

      private String buildPattern(List<String> patterns, String defaultPattern)