Class Report.SuppressedViolation

  • Enclosing class:
    Report

    public static class Report.SuppressedViolation
    extends Object
    Represents a violation, that has been suppressed.
    • Constructor Detail

      • SuppressedViolation

        public SuppressedViolation​(RuleViolation rv,
                                   boolean isNOPMD,
                                   String userMessage)
        Creates a suppressed violation.
        Parameters:
        rv - the actual violation, that has been suppressed
        isNOPMD - the suppression mode: true if it is suppressed via a NOPMD comment, false if suppressed via annotations.
        userMessage - contains the suppressed code line or null
    • Method Detail

      • suppressedByNOPMD

        public boolean suppressedByNOPMD()
        Returns true if the violation has been suppressed via a NOPMD comment.
        Returns:
        true if the violation has been suppressed via a NOPMD comment.
      • suppressedByAnnotation

        public boolean suppressedByAnnotation()
        Returns true if the violation has been suppressed via a annotation.
        Returns:
        true if the violation has been suppressed via a annotation.
      • getUserMessage

        public String getUserMessage()