public class ParametricRuleViolation<T extends Node> extends java.lang.Object implements RuleViolation
Modifier and Type | Field and Description |
---|---|
protected int |
beginColumn |
protected int |
beginLine |
protected java.lang.String |
className |
protected java.lang.String |
description |
protected int |
endColumn |
protected int |
endLine |
protected java.lang.String |
filename |
protected java.lang.String |
methodName |
protected java.lang.String |
packageName |
protected Rule |
rule |
protected boolean |
suppressed |
protected java.lang.String |
variableName |
Constructor and Description |
---|
ParametricRuleViolation(Rule theRule,
RuleContext ctx,
T node,
java.lang.String message) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
expandVariables(java.lang.String message) |
int |
getBeginColumn()
Get the column number of the begin line in the source file in which this
violation was identified.
|
int |
getBeginLine()
Get the begin line number in the source file in which this violation was
identified.
|
java.lang.String |
getClassName()
Get the name of the Class in which this violation was identified.
|
java.lang.String |
getDescription()
Get the description of this violation.
|
int |
getEndColumn()
Get the column number of the end line in the source file in which this
violation was identified.
|
int |
getEndLine()
Get the end line number in the source file in which this violation was
identified.
|
java.lang.String |
getFilename()
Get the source file name in which this violation was identified.
|
java.lang.String |
getMethodName()
Get the method name in which this violation was identified.
|
java.lang.String |
getPackageName()
Get the package name of the Class in which this violation was identified.
|
Rule |
getRule()
Get the Rule which identified this violation.
|
java.lang.String |
getVariableName()
Get the variable name on which this violation was identified.
|
protected java.lang.String |
getVariableValue(java.lang.String name) |
boolean |
isSuppressed()
Indicates whether this violation has been suppressed.
|
protected boolean |
isVariable(java.lang.String name) |
void |
setLines(int theBeginLine,
int theEndLine) |
java.lang.String |
toString() |
protected final Rule rule
protected final java.lang.String description
protected boolean suppressed
protected java.lang.String filename
protected int beginLine
protected int beginColumn
protected int endLine
protected int endColumn
protected java.lang.String packageName
protected java.lang.String className
protected java.lang.String methodName
protected java.lang.String variableName
public ParametricRuleViolation(Rule theRule, RuleContext ctx, T node, java.lang.String message)
protected java.lang.String expandVariables(java.lang.String message)
protected boolean isVariable(java.lang.String name)
protected java.lang.String getVariableValue(java.lang.String name)
public Rule getRule()
RuleViolation
getRule
in interface RuleViolation
public java.lang.String getDescription()
RuleViolation
getDescription
in interface RuleViolation
public boolean isSuppressed()
RuleViolation
isSuppressed
in interface RuleViolation
true
if this violation is suppressed,
false
otherwise.public java.lang.String getFilename()
RuleViolation
getFilename
in interface RuleViolation
public int getBeginLine()
RuleViolation
getBeginLine
in interface RuleViolation
public int getBeginColumn()
RuleViolation
getBeginColumn
in interface RuleViolation
public int getEndLine()
RuleViolation
getEndLine
in interface RuleViolation
public int getEndColumn()
RuleViolation
getEndColumn
in interface RuleViolation
public java.lang.String getPackageName()
RuleViolation
getPackageName
in interface RuleViolation
public java.lang.String getClassName()
RuleViolation
getClassName
in interface RuleViolation
public java.lang.String getMethodName()
RuleViolation
getMethodName
in interface RuleViolation
public java.lang.String getVariableName()
RuleViolation
getVariableName
in interface RuleViolation
public void setLines(int theBeginLine, int theEndLine)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2002–2018 PMD. All rights reserved.