Class SinglelineDetector
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.regexp.SinglelineDetector
A detector that matches individual lines.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
Tracks the number of matches.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. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Check a line for matches.private void
finish()
Perform processing at the end of a set of lines.void
processLines
(FileText fileText) Processes a set of lines looking for matches.
-
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:
-
options
The detection options to use. -
currentMatches
Tracks the number of matches.
-
-
Constructor Details
-
SinglelineDetector
SinglelineDetector(DetectorOptions options) Creates an instance.- Parameters:
options
- the options to use.
-
-
Method Details
-
processLines
Processes a set of lines looking for matches.- Parameters:
fileText
-FileText
object contains the lines to process.
-
finish
Perform processing at the end of a set of lines. -
checkLine
Check a line for matches.- Parameters:
lineNo
- the line number of the line to checkmatcher
- the matcher to use
-