Class SinglelineDetector

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

public class SinglelineDetector extends Object
A detector that matches individual lines.
  • Field Details

  • 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

      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.
    • checkLine

      private void checkLine(int lineNo, Matcher matcher)
      Check a line for matches.
      Parameters:
      lineNo - the line number of the line to check
      matcher - the matcher to use