Class CommentSuppressor

java.lang.Object
com.puppycrawl.tools.checkstyle.checks.regexp.CommentSuppressor
All Implemented Interfaces:
MatchSuppressor

class CommentSuppressor extends Object implements MatchSuppressor
Implementation of a MatchSuppressor that suppresses based on whether in a comment.
  • Field Details

  • Constructor Details

    • CommentSuppressor

      Constructor for this suppressor.
      Parameters:
      currentContents - content of checked file.
  • Method Details

    • shouldSuppress

      public boolean shouldSuppress(int startLineNo, int startColNo, int endLineNo, int endColNo)
      Description copied from interface: MatchSuppressor
      Checks if the specified selection should be suppressed.
      Specified by:
      shouldSuppress in interface MatchSuppressor
      Parameters:
      startLineNo - the starting line number
      startColNo - the starting column number
      endLineNo - the ending line number
      endColNo - the ending column number
      Returns:
      true if the positions intersects with a comment.