org.incava.analysis
Class Analyzer
java.lang.Object
org.incava.analysis.Analyzer
public class Analyzer
extends java.lang.Object
Bridge between violations and reports.
void | addViolation(String message, int beginLine, int beginColumn, int endLine, int endColumn) - Adds a violation from a beginning position to an ending position.
|
void | addViolation(String message, net.sourceforge.pmd.ast.Token token) - Adds a violation with a single token.
|
void | addViolation(String message, net.sourceforge.pmd.ast.Token firstToken, net.sourceforge.pmd.ast.Token lastToken) - Adds a violation spanning from one token to another.
|
void | addViolation(String message, Location start, Location end) - Adds a violation from one location to another.
|
protected Report | getReport() - Returns the report used by this analyzer.
|
Analyzer
public Analyzer(Report r)
Creates an analyzer with a report.
r
- The report that this analyzer sends violations to.
addViolation
public void addViolation(String message,
int beginLine,
int beginColumn,
int endLine,
int endColumn)
Adds a violation from a beginning position to an ending position.
message
- The violation message.beginLine
- The line where this violation begins.beginColumn
- The column where this violation begins.endLine
- The line where this violation ends.endColumn
- The column where this violation ends.
addViolation
public void addViolation(String message,
net.sourceforge.pmd.ast.Token token)
Adds a violation with a single token.
message
- The violation message.token
- The token to which the violation applies.
addViolation
public void addViolation(String message,
net.sourceforge.pmd.ast.Token firstToken,
net.sourceforge.pmd.ast.Token lastToken)
Adds a violation spanning from one token to another.
message
- The violation message.firstToken
- The first token this violation spans.lastToken
- The last token this violation spans, inclusive.
addViolation
public void addViolation(String message,
Location start,
Location end)
Adds a violation from one location to another.
message
- The violation message.start
- Where this violation begins.end
- Where this violation ends, inclusive.
getReport
protected Report getReport()
Returns the report used by this analyzer.