Class SinglelineDetector
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.checks.regexp.SinglelineDetector
-
class SinglelineDetector extends Object
A detector that matches individual lines.
-
-
Field Summary
Fields Modifier and Type Field Description private int
currentMatches
Tracks the number of matches.static String
MSG_REGEXP_EXCEEDED
A key is pointing to the warning message text in "messages.properties" file.static 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 Summary
Constructors Constructor Description SinglelineDetector(DetectorOptions options)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkLine(int lineNo, Matcher matcher)
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 Detail
-
MSG_REGEXP_EXCEEDED
public static final String MSG_REGEXP_EXCEEDED
A key is pointing to the warning message text in "messages.properties" file.- See Also:
- Constant Field Values
-
MSG_REGEXP_MINIMUM
public static final String MSG_REGEXP_MINIMUM
A key is pointing to the warning message text in "messages.properties" file.- See Also:
- Constant Field Values
-
options
private final DetectorOptions options
The detection options to use.
-
currentMatches
private int currentMatches
Tracks the number of matches.
-
-
Constructor Detail
-
SinglelineDetector
SinglelineDetector(DetectorOptions options)
Creates an instance.- Parameters:
options
- the options to use.
-
-
Method Detail
-
processLines
public void processLines(FileText fileText)
Processes a set of lines looking for matches.- Parameters:
fileText
-FileText
object contains the lines to process.
-
finish
private void finish()
Perform processing at the end of a set of lines.
-
-