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 RuleViolation
getRuleViolation()
String
getUserMessage()
boolean
suppressedByAnnotation()
Returnstrue
if the violation has been suppressed via a annotation.boolean
suppressedByNOPMD()
Returnstrue
if 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:true
if it is suppressed via a NOPMD comment,false
if suppressed via annotations.userMessage
- contains the suppressed code line ornull
-
-
Method Detail
-
suppressedByNOPMD
public boolean suppressedByNOPMD()
Returnstrue
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()
Returnstrue
if the violation has been suppressed via a annotation.- Returns:
true
if the violation has been suppressed via a annotation.
-
getRuleViolation
public RuleViolation getRuleViolation()
-
getUserMessage
public String getUserMessage()
-
-