Class MultilineDetector

java.lang.Object
com.puppycrawl.tools.checkstyle.checks.regexp.MultilineDetector

public class MultilineDetector extends Object
A detector that matches across multiple lines.
  • Field Details

  • Constructor Details

    • MultilineDetector

      MultilineDetector(DetectorOptions options, String exceededMessage, String minimumMessage, String emptyMessage, String stackOverflowMessage)
      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.
      emptyMessage - the message key for empty format.
      stackOverflowMessage - the message key for StackOverflow error.
  • Method Details

    • processLines

      public void processLines(FileText fileText)
      Processes an entire text file looking for matches.
      Parameters:
      fileText - the text to process
    • findMatch

      private void findMatch()
      Method that finds the matches.
    • finish

      private void finish()
      Perform processing at the end of a set of lines.
    • resetState

      private void resetState()
      Reset the state of the detector.