net.sourceforge.pmd
public interface Rule
| Field Summary | |
|---|---|
| static int | LOWEST_PRIORITY |
| static String[] | PRIORITIES |
| Method Summary | |
|---|---|
| void | addExample(String example)
Add a single example for this Rule. |
| void | addProperties(Properties properties)
Add a set of properties to this Rule. |
| void | addProperty(String name, String property)
Add a specific property to this Rule. |
| void | addRuleChainVisit(String astNodeName)
Adds an AST node name to be visited by the Rule on the RuleChain. |
| void | apply(List<?> astCompilationUnits, RuleContext ctx)
Apply this rule to the given collection of compilation units, using the
given context. |
| void | end(RuleContext ctx)
End processing. |
| boolean | getBooleanProperty(String name)
Get the boolean value for the given property. |
| String | getDescription()
Get the description of this Rule. |
| double | getDoubleProperty(String name)
Get the double value for the given property. |
| String | getExample()
Still used by the JDeveloper plugin
|
| List<String> | getExamples()
Get the list of examples for this Rule. |
| String | getExternalInfoUrl()
Get a URL for external information about this Rule. |
| int | getIntProperty(String name)
Get the int value for the given property. |
| String | getMessage()
Get the message to show when this Rule identifies a violation. |
| String | getName()
Get the name of this Rule. |
| int | getPriority()
Get the priority of this Rule. |
| String | getPriorityName()
Get a name for the priority of this Rule. |
| Properties | getProperties()
Get all properties for this Rule.
|
| List<String> | getRuleChainVisits()
Gets the collection of AST node names visited by the Rule on the
RuleChain. |
| String | getRuleClass()
Get the class of this Rule. |
| String | getRuleSetName()
Get the name of the RuleSet containing this Rule.
|
| String | getSince()
Get the version of PMD in which this Rule was added.
|
| String | getStringProperty(String name)
Get the java.util.String value for the given property. |
| boolean | hasProperty(String name)
Get whether this Rule has a property of the given name. |
| boolean | include()
TODO What is this?
|
| PropertyDescriptor | propertyDescriptorFor(String name)
Get the PropertyDescriptor for the given property. |
| void | setDescription(String description)
Set the description of this Rule. |
| void | setExternalInfoUrl(String externalInfoUrl)
Set a URL for external information about this Rule. |
| void | setInclude(boolean include)
TODO What is this?
|
| void | setMessage(String message)
Set the message to show when this Rule identifies a violation. |
| void | setName(String name)
Set the name of this Rule. |
| void | setPriority(int priority)
Set the priority of this Rule. |
| void | setRuleClass(String ruleClass)
Set the class of this Rule. |
| void | setRuleSetName(String name)
Set the name of the RuleSet containing this Rule.
|
| void | setSince(String since)
Set the version of PMD in which this Rule was added. |
| void | setUsesDFA()
Sets whether this Rule uses Data Flow Analysis. |
| void | setUsesTypeResolution()
Sets whether this Rule uses Type Resolution. |
| void | start(RuleContext ctx)
Start processing. |
| boolean | usesDFA()
Gets whether this Rule uses Data Flow Analysis. |
| boolean | usesRuleChain()
Gets whether this Rule uses the RuleChain. |
| boolean | usesTypeResolution()
Gets whether this Rule uses Type Resolution. |
boolean value for the given property.double value for the given property.Deprecated: use getExamples(), since we now support multiple examples
Still used by the JDeveloper pluginint value for the given property.Returns: the properties for the rule
See Also: RuleSet
null if not applicable.java.util.String value for the given property.Deprecated: Don't know what this is for, so deprecating it.
TODO What is this?Deprecated: Don't know what this is for, so deprecating it.
TODO What is this?See Also: RuleSet