public class RegexpMultilineCheck extends AbstractFileSetCheck
Modifier and Type | Field and Description |
---|---|
private MultilineDetector |
detector
The detector to use.
|
private java.lang.String |
format
The format of the regular expression to match.
|
private boolean |
ignoreCase
Whether to ignore case when matching.
|
private int |
maximum
The maximum number of matches required per file.
|
private java.lang.String |
message
The message to report for a match.
|
private int |
minimum
The minimum number of matches required per file.
|
Constructor and Description |
---|
RegexpMultilineCheck() |
Modifier and Type | Method and Description |
---|---|
void |
beginProcessing(java.lang.String charset)
Called when about to be called to process a set of files.
|
protected void |
processFiltered(java.io.File file,
java.util.List<java.lang.String> lines)
Called to process a file that matches the specified file extensions.
|
void |
setFormat(java.lang.String format)
Sets the format of the regular expression to match.
|
void |
setIgnoreCase(boolean ignoreCase)
Sets whether to ignore case when matching.
|
void |
setMaximum(int maximum)
Sets the maximum number of matches required per file.
|
void |
setMessage(java.lang.String message)
Sets the message to report for a match.
|
void |
setMinimum(int minimum)
Sets the minimum number of matches required per file.
|
destroy, finishProcessing, fireErrors, getFileExtensions, getMessageCollector, getMessageDispatcher, init, log, log, process, setFileExtensions, setMessageDispatcher
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
configure
contextualize
private java.lang.String format
private java.lang.String message
private int minimum
private int maximum
private boolean ignoreCase
private MultilineDetector detector
public void beginProcessing(java.lang.String charset)
FileSetCheck
beginProcessing
in interface FileSetCheck
beginProcessing
in class AbstractFileSetCheck
charset
- the character set used to read the files.protected void processFiltered(java.io.File file, java.util.List<java.lang.String> lines)
AbstractFileSetCheck
processFiltered
in class AbstractFileSetCheck
file
- the file to be processedlines
- an immutable list of the contents of the file.public void setFormat(java.lang.String format)
format
- the format of the regular expression to match.public void setMessage(java.lang.String message)
message
- the message to report for a match.public void setMinimum(int minimum)
minimum
- the minimum number of matches required per file.public void setMaximum(int maximum)
maximum
- the maximum number of matches required per file.public void setIgnoreCase(boolean ignoreCase)
ignoreCase
- whether to ignore case when matching.