Class MultilineDetector
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.regexp.MultilineDetector
A detector that matches across multiple lines.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate intTracks the number of matches.private MatcherThe matcher.static final StringA key is pointing to the warning message text in "messages.properties" file.static final StringA key is pointing to the warning message text in "messages.properties" file.static final StringA key is pointing to the warning message text in "messages.properties" file.static final StringA key is pointing to the warning message text in "messages.properties" file.private final DetectorOptionsThe detection options to use.private FileTextThe file text content.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate voidMethod that finds the matches.private voidfinish()Perform processing at the end of a set of lines.voidprocessLines(FileText fileText) Processes an entire text file looking for matches.private voidReset the state of the detector.
- 
Field Details- 
MSG_REGEXP_EXCEEDEDA key is pointing to the warning message text in "messages.properties" file.- See Also:
 
- 
MSG_REGEXP_MINIMUMA key is pointing to the warning message text in "messages.properties" file.- See Also:
 
- 
MSG_EMPTYA key is pointing to the warning message text in "messages.properties" file.- See Also:
 
- 
MSG_STACKOVERFLOWA key is pointing to the warning message text in "messages.properties" file.- See Also:
 
- 
optionsThe detection options to use.
- 
currentMatchesTracks the number of matches.
- 
matcherThe matcher.
- 
textThe file text content.
 
- 
- 
Constructor Details- 
MultilineDetectorMultilineDetector(DetectorOptions options) Creates an instance.- Parameters:
- options- the options to use.
 
 
- 
- 
Method Details- 
processLinesProcesses an entire text file looking for matches.- Parameters:
- fileText- the text to process
 
- 
findMatchMethod that finds the matches.
- 
finishPerform processing at the end of a set of lines.
- 
resetStateReset the state of the detector.
 
-