public class Violation
extends java.lang.Object
Violation - a violation and its information| Constructor and Description |
|---|
Violation(Rule rule,
java.lang.String sourcePath,
java.lang.String className,
java.lang.String packageName,
java.lang.String message,
int line,
int column)
Creates a Violation instance
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getClassName()
getClassName |
int |
getColumn()
getColumn |
int |
getLine()
getLine |
java.lang.String |
getMessage()
getMessage |
java.lang.String |
getPackageName()
getPackageName |
Rule |
getRule()
getRule |
java.lang.String |
getSource()
getSource |
void |
setClassName(java.lang.String className)
setClassName |
void |
setColumn(int column)
setColumn |
void |
setLine(int line)
setLine |
void |
setMessage(java.lang.String message)
setMessage |
void |
setPackageName(java.lang.String packageName)
setPackageName |
void |
setRule(Rule rule)
setRule |
void |
setSource(java.lang.String source)
setSource |
java.lang.String |
toString()
Returns a string representation of the object.
|
public Violation(Rule rule, java.lang.String sourcePath, java.lang.String className, java.lang.String packageName, java.lang.String message, int line, int column)
rule - which was violatedsourcePath - full qualified path to fileclassName - name of classpackageName - package of classmessage - violation messageline - of violationcolumn - of violationpublic void setRule(Rule rule)
setRulerule - a Rule valuepublic Rule getRule()
getRuleRule valuepublic void setSource(java.lang.String source)
setSourcesource - a String valuepublic java.lang.String getSource()
getSourceString valuepublic void setClassName(java.lang.String className)
setClassNameclassName - a String valuepublic java.lang.String getClassName()
getClassNameString valuepublic void setPackageName(java.lang.String packageName)
setPackageNamepackageName - a String valuepublic java.lang.String getPackageName()
getPackageNameString valuepublic void setMessage(java.lang.String message)
setMessagemessage - a String valuepublic java.lang.String getMessage()
getMessageString valuepublic void setLine(int line)
setLineline - an int valuepublic int getLine()
getLineint valuepublic void setColumn(int column)
setColumncolumn - an int valuepublic int getColumn()
getColumnint valuepublic java.lang.String toString()
toString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString in class java.lang.Object
JCSC is released under the terms of the GNU General Public License