Class HgIgnoreBuilder
java.lang.Object
org.apache.rat.config.exclusion.fileProcessors.AbstractFileProcessorBuilder
org.apache.rat.config.exclusion.fileProcessors.HgIgnoreBuilder
A processor for the
.hgignore
files.- See Also:
-
Field Summary
Fields inherited from class org.apache.rat.config.exclusion.fileProcessors.AbstractFileProcessorBuilder
commentFilter, fileName, REGEX_FMT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmodifyEntry
(Consumer<MatcherSet> matcherSetConsumer, DocumentName documentName, String entry) Allows modification of the file entry to match theMatchPattern
format.protected MatcherSet
process
(Consumer<MatcherSet> matcherSetConsumer, DocumentName root, DocumentName documentName) Process by reading the file, creating a MatcherSet, and adding it to the matcherSets.Methods inherited from class org.apache.rat.config.exclusion.fileProcessors.AbstractFileProcessorBuilder
build, listFiles
-
Constructor Details
-
HgIgnoreBuilder
public HgIgnoreBuilder()Constructs the.hgignore
processor.
-
-
Method Details
-
process
protected MatcherSet process(Consumer<MatcherSet> matcherSetConsumer, DocumentName root, DocumentName documentName) Description copied from class:AbstractFileProcessorBuilder
Process by reading the file, creating a MatcherSet, and adding it to the matcherSets.- Overrides:
process
in classAbstractFileProcessorBuilder
- Parameters:
matcherSetConsumer
- the consumer to add the custom matcher sets to.root
- The root against which to resolve names.documentName
- the file to read.- Returns:
- A matcher set based on the strings in the file.
-
modifyEntry
public Optional<String> modifyEntry(Consumer<MatcherSet> matcherSetConsumer, DocumentName documentName, String entry) Description copied from class:AbstractFileProcessorBuilder
Allows modification of the file entry to match theMatchPattern
format. Default implementation returns the @{code entry} argument.- Overrides:
modifyEntry
in classAbstractFileProcessorBuilder
- Parameters:
documentName
- the name of the document that the file was read from.entry
- the entry from that document.- Returns:
- the modified string or an empty Optional to skip the string.
-