net.sourceforge.pmd
public abstract class CommonAbstractRule extends Object implements Rule
Field Summary | |
---|---|
protected String | description |
protected String | example |
protected String | externalInfoUrl |
protected boolean | include |
protected String | message |
protected String | name |
protected int | priority |
protected Properties | properties |
protected String | ruleSetName |
protected boolean | usesDFA |
Method Summary | |
---|---|
void | addProperties(Properties properties) |
void | addProperty(String name, String value) |
protected void | addViolation(Object data, SimpleNode node)
Adds a violation to the report.
|
protected void | addViolation(Object data, SimpleNode node, String embed)
Adds a violation to the report.
|
protected void | addViolation(Object data, Node node, Object[] args)
Adds a violation to the report.
|
protected void | addViolationWithMessage(Object data, SimpleNode node, String msg)
Adds a violation to the report.
|
boolean | equals(Object o)
Test if rules are equals. |
boolean | getBooleanProperty(String name) |
String | getDescription() |
double | getDoubleProperty(String name) |
String | getExample() |
String | getExternalInfoUrl() |
int | getIntProperty(String name) |
String | getMessage() |
String | getName() |
int | getPriority() |
String | getPriorityName() |
Properties | getProperties() |
String | getRuleSetName() |
String | getStringProperty(String name) |
int | hashCode()
Return a hash code to conform to equality. |
boolean | hasProperty(String name) |
boolean | include() |
void | setDescription(String description) |
void | setExample(String example) |
void | setExternalInfoUrl(String url) |
void | setInclude(boolean include) |
void | setMessage(String message) |
void | setName(String name) |
void | setPriority(int priority) |
void | setRuleSetName(String ruleSetName) |
void | setUsesDFA() |
boolean | usesDFA() |
Parameters: ctx the RuleContext node the node that produces the violation
Parameters: ctx the RuleContext node the node that produces the violation embed a variable to embed in the rule violation message
Parameters: ctx the RuleContext node the node that produces the violation, may be null, in which case all line and column info will be set to zero args objects to embed in the rule violation message
Parameters: ctx the RuleContext node the node that produces the violation msg specific message to put in the report