Package net.sourceforge.pmd
Class Report.SuppressedViolation
- java.lang.Object
-
- net.sourceforge.pmd.Report.SuppressedViolation
-
-
Constructor Summary
Constructors Constructor Description SuppressedViolation(RuleViolation rv, boolean isNOPMD, String userMessage)Creates a suppressed violation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuleViolationgetRuleViolation()StringgetUserMessage()booleansuppressedByAnnotation()Returnstrueif the violation has been suppressed via a annotation.booleansuppressedByNOPMD()Returnstrueif the violation has been suppressed via a NOPMD comment.
-
-
-
Constructor Detail
-
SuppressedViolation
public SuppressedViolation(RuleViolation rv, boolean isNOPMD, String userMessage)
Creates a suppressed violation.- Parameters:
rv- the actual violation, that has been suppressedisNOPMD- the suppression mode:trueif it is suppressed via a NOPMD comment,falseif suppressed via annotations.userMessage- contains the suppressed code line ornull
-
-
Method Detail
-
suppressedByNOPMD
public boolean suppressedByNOPMD()
Returnstrueif the violation has been suppressed via a NOPMD comment.- Returns:
trueif the violation has been suppressed via a NOPMD comment.
-
suppressedByAnnotation
public boolean suppressedByAnnotation()
Returnstrueif the violation has been suppressed via a annotation.- Returns:
trueif the violation has been suppressed via a annotation.
-
getRuleViolation
public RuleViolation getRuleViolation()
-
getUserMessage
public String getUserMessage()
-
-