Class SinglelineDetector
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.regexp.SinglelineDetector
A detector that matches individual lines.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intTracks the number of matches.private final StringThe message key for exceeded matches.private final StringThe message key for minimum matches not met.private final DetectorOptionsThe detection options to use. -
Constructor Summary
ConstructorsConstructorDescriptionSinglelineDetector(DetectorOptions options, String exceededMessage, String minimumMessage) Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidCheck a line for matches.private voidfinish()Perform processing at the end of a set of lines.voidprocessLines(FileText fileText) Processes a set of lines looking for matches.
-
Field Details
-
options
The detection options to use. -
exceededMessage
The message key for exceeded matches. -
minimumMessage
The message key for minimum matches not met. -
currentMatches
Tracks the number of matches.
-
-
Constructor Details
-
SinglelineDetector
SinglelineDetector(DetectorOptions options, String exceededMessage, String minimumMessage) Creates an instance.- Parameters:
options- the options to use.exceededMessage- the message key for exceeded matches.minimumMessage- the message key for minimum matches not met.
-
-
Method Details
-
processLines
Processes a set of lines looking for matches.- Parameters:
fileText-FileTextobject 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
-