|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.rules.Violation
public class Violation
A class that represents a violation. A violation happens when a resource does not respect a defined rule.
Constructor Summary | |
---|---|
Violation(Rule rule)
Creates of a violation from a rule. |
|
Violation(Rule rule,
Resource resource)
Creates a fully qualified violation |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.Integer |
getLineId()
|
java.lang.String |
getMessage()
|
RulePriority |
getPriority()
|
Resource |
getResource()
|
Rule |
getRule()
|
int |
hashCode()
|
Violation |
setLineId(java.lang.Integer lineId)
Sets the violation line |
Violation |
setMessage(java.lang.String message)
Sets the violation message |
Violation |
setPriority(RulePriority priority)
Sets the violation priority |
Violation |
setResource(Resource resource)
Sets the resource the violation applies to |
Violation |
setRule(Rule rule)
Sets the rule violated |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Violation(Rule rule)
public Violation(Rule rule, Resource resource)
rule
- the rule that has been violatedresource
- the resource the violation should be attached toMethod Detail |
---|
public Resource getResource()
public Violation setResource(Resource resource)
public Rule getRule()
public Violation setRule(Rule rule)
public java.lang.String getMessage()
public Violation setMessage(java.lang.String message)
public java.lang.Integer getLineId()
public Violation setLineId(java.lang.Integer lineId)
public RulePriority getPriority()
public Violation setPriority(RulePriority priority)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |