Class ExclusionProcessor

java.lang.Object
org.apache.rat.config.exclusion.ExclusionProcessor

public class ExclusionProcessor extends Object
Processes the include and exclude patterns and applies the result against a base directory to return an IReportable that contains all the reportable objects.
  • Constructor Details

    • ExclusionProcessor

      public ExclusionProcessor()
      Constructs the processor.
  • Method Details

    • addIncludedPatterns

      public ExclusionProcessor addIncludedPatterns(Iterable<String> patterns)
      Add the Iterable of strings to the collection of file/directory patters to ignore.
      Parameters:
      patterns - the patterns to add
      Returns:
      this
    • addIncludedMatcher

      public ExclusionProcessor addIncludedMatcher(DocumentNameMatcher matcher)
      Add a DocumentNameMatcher to the collection of file/directory patterns to ignore.
      Parameters:
      matcher - the DocumentNameMatcher to add. Will be ignored if null.
      Returns:
      this
    • addFileProcessor

      public ExclusionProcessor addFileProcessor(StandardCollection collection)
      Add the file processor from a StandardCollection.
      Parameters:
      collection - the collection to add the processor from.
      Returns:
      this
    • addIncludedCollection

      public ExclusionProcessor addIncludedCollection(StandardCollection collection)
      Add the patterns from the StandardCollection as included patterns.
      Parameters:
      collection - the standard collection to add the includes from.
      Returns:
      this
    • addExcludedPatterns

      public ExclusionProcessor addExcludedPatterns(Iterable<String> patterns)
      Add the patterns from collections of patterns as excluded patterns.
      Parameters:
      patterns - the strings to that define patterns to be excluded from processing.
      Returns:
      this
    • addExcludedMatcher

      public ExclusionProcessor addExcludedMatcher(DocumentNameMatcher matcher)
      Add the DocumentNameMatcher as an excluded pattern.
      Parameters:
      matcher - the DocumentNameMatcher to exclude.
      Returns:
      this
    • addExcludedCollection

      public ExclusionProcessor addExcludedCollection(StandardCollection collection)
      Excludes the files/directories specified by a StandardCollection.
      Parameters:
      collection - the StandardCollection that identifies the files to exclude.
      Returns:
      this
    • getNameMatcher

      public DocumentNameMatcher getNameMatcher(DocumentName basedir)
      Creates a Document name matcher that will return false on any document that is excluded.
      Parameters:
      basedir - the base directory to make everything relative to.
      Returns:
      A DocumentNameMatcher that will return false for any document that is to be excluded.