Class MultilineDetector
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.regexp.MultilineDetector
A detector that matches across multiple lines.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
Tracks the number of matches.private Matcher
The matcher.static final String
A key is pointing to the warning message text in "messages.properties" file.static final String
A key is pointing to the warning message text in "messages.properties" file.static final String
A key is pointing to the warning message text in "messages.properties" file.static final String
A key is pointing to the warning message text in "messages.properties" file.private final DetectorOptions
The detection options to use.private FileText
The file text content. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
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
Reset the state of the detector.
-
Field Details
-
MSG_REGEXP_EXCEEDED
A key is pointing to the warning message text in "messages.properties" file.- See Also:
-
MSG_REGEXP_MINIMUM
A key is pointing to the warning message text in "messages.properties" file.- See Also:
-
MSG_EMPTY
A key is pointing to the warning message text in "messages.properties" file.- See Also:
-
MSG_STACKOVERFLOW
A key is pointing to the warning message text in "messages.properties" file.- See Also:
-
options
The detection options to use. -
currentMatches
Tracks the number of matches. -
matcher
The matcher. -
text
The file text content.
-
-
Constructor Details
-
MultilineDetector
MultilineDetector(DetectorOptions options) Creates an instance.- Parameters:
options
- the options to use.
-
-
Method Details
-
processLines
Processes an entire text file looking for matches.- Parameters:
fileText
- the text to process
-
findMatch
Method that finds the matches. -
finish
Perform processing at the end of a set of lines. -
resetState
Reset the state of the detector.
-