org.incava.analysis
public class Violation extends Object implements Comparable
Constructor Summary | |
---|---|
Violation(String message, int beginLine, int beginColumn, int endLine, int endColumn)
Creates a violation from a message and begin and end positions.
| |
Violation(String message, Token beginToken, Token endToken)
Creates a violation from a message and beginning and ending token.
| |
Violation(String message, Token token)
Creates a violation from a message and a token. |
Method Summary | |
---|---|
int | compareTo(Object obj)
Compares this violation to another. |
boolean | equals(Object obj)
Returns whether the other object is equal to this one. |
int | getBeginColumn()
Returns the column where the violation starts. |
int | getBeginLine()
Returns the line where the violation starts. |
int | getEndColumn()
Returns the column where the violation ends. |
int | getEndLine()
Returns the line where the violation ends. |
String | getMessage()
Returns the message for this violation. |
String | toString()
Returns this violation, as a string.
|
Parameters: message The message applying to this violation. beginLine The line where the violation begins. beginColumn The column where the violation begins. endLine The line where the violation ends. endColumn The column where the violation ends.
Parameters: message The message applying to this violation. beginToken The token where the violation begins. endToken The token where the violation ends.
token + token.image.length() - 1
.
Parameters: message The message applying to this violation. token The token to which the violation applies.
Parameters: obj The violation to compare this to.
Returns: -1, 0, or 1, for less than, equivalent to, or greater than.
Parameters: obj The violation to compare this to.
Returns: Whether the other violation is equal to this one.
Returns: This violation, as a string.