class SinglelineDetector
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
currentMatches
Tracks the number of matches.
|
static java.lang.String |
MSG_REGEXP_EXCEEDED
A key is pointing to the warning message text in "messages.properties"
file.
|
static java.lang.String |
MSG_REGEXP_MINIMUM
A key is pointing to the warning message text in "messages.properties"
file.
|
private DetectorOptions |
options
The detection options to use.
|
Constructor and Description |
---|
SinglelineDetector(DetectorOptions options)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
private void |
checkLine(int lineNo,
java.lang.String line,
java.util.regex.Matcher matcher,
int startPosition)
Check a line for matches.
|
private void |
finish()
Perform processing at the end of a set of lines.
|
void |
processLines(java.util.List<java.lang.String> lines)
Processes a set of lines looking for matches.
|
private void |
resetState()
Reset the state of the detector.
|
public static final java.lang.String MSG_REGEXP_EXCEEDED
public static final java.lang.String MSG_REGEXP_MINIMUM
private final DetectorOptions options
private int currentMatches
SinglelineDetector(DetectorOptions options)
options
- the options to use.public void processLines(java.util.List<java.lang.String> lines)
lines
- the lines to process.private void finish()
private void resetState()
private void checkLine(int lineNo, java.lang.String line, java.util.regex.Matcher matcher, int startPosition)
lineNo
- the line number of the line to checkline
- the line to checkmatcher
- the matcher to usestartPosition
- the position to start searching from.