class MultilineDetector
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
currentMatches
Tracks the number of matches.
|
private java.util.regex.Matcher |
matcher
The matcher.
|
static java.lang.String |
MSG_EMPTY
A key is pointing to the warning message text in "messages.properties"
file.
|
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.
|
static java.lang.String |
MSG_STACKOVERFLOW
A key is pointing to the warning message text in "messages.properties"
file.
|
private DetectorOptions |
options
The detection options to use.
|
private FileText |
text
The file text content.
|
Constructor and Description |
---|
MultilineDetector(DetectorOptions options)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
private void |
findMatch()
Method that finds the matches.
|
private void |
finish()
Perform processing at the end of a set of lines.
|
void |
processLines(FileText fileText)
Processes an entire text file 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
public static final java.lang.String MSG_EMPTY
public static final java.lang.String MSG_STACKOVERFLOW
private final DetectorOptions options
private int currentMatches
private java.util.regex.Matcher matcher
private FileText text
MultilineDetector(DetectorOptions options)
options
- the options to use.public void processLines(FileText fileText)
fileText
- the text to processprivate void findMatch()
private void finish()
private void resetState()