public class AbstractDelegateRule extends java.lang.Object implements Rule
LOWEST_PRIORITY, PRIORITIES| Constructor and Description |
|---|
AbstractDelegateRule() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExample(java.lang.String example)
Add a single example for this Rule.
|
void |
addProperties(java.util.Properties properties)
Add a set of properties to this Rule.
|
void |
addProperty(java.lang.String name,
java.lang.String property)
Add a specific property to this Rule.
|
void |
addRuleChainVisit(java.lang.String astNodeName)
Adds an AST node name to be visited by the Rule on the RuleChain.
|
void |
apply(java.util.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(java.lang.String name)
Get the
boolean value for the given property. |
java.lang.String |
getDescription()
Get the description of this Rule.
|
double |
getDoubleProperty(java.lang.String name)
Get the
double value for the given property. |
java.lang.String |
getExample()
Still used by the JDeveloper plugin
|
java.util.List<java.lang.String> |
getExamples()
Get the list of examples for this Rule.
|
java.lang.String |
getExternalInfoUrl()
Get a URL for external information about this Rule.
|
int |
getIntProperty(java.lang.String name)
Get the
int value for the given property. |
java.lang.String |
getMessage()
Get the message to show when this Rule identifies a violation.
|
java.lang.String |
getName()
Get the name of this Rule.
|
int |
getPriority()
Get the priority of this Rule.
|
java.lang.String |
getPriorityName()
Get a name for the priority of this Rule.
|
java.util.Properties |
getProperties()
Get all properties for this Rule.
|
Rule |
getRule() |
java.util.List<java.lang.String> |
getRuleChainVisits()
Gets the collection of AST node names visited by the Rule on the
RuleChain.
|
java.lang.String |
getRuleClass()
Get the class of this Rule.
|
java.lang.String |
getRuleSetName()
Get the name of the RuleSet containing this Rule.
|
java.lang.String |
getSince()
Get the version of PMD in which this Rule was added.
|
java.lang.String |
getStringProperty(java.lang.String name)
Get the
java.util.String value for the given property. |
boolean |
hasProperty(java.lang.String name)
Get whether this Rule has a property of the given name.
|
boolean |
include()
TODO What is this?
|
PropertyDescriptor |
propertyDescriptorFor(java.lang.String name)
Get the PropertyDescriptor for the given property.
|
void |
setDescription(java.lang.String description)
Set the description of this Rule.
|
void |
setExternalInfoUrl(java.lang.String url)
Set a URL for external information about this Rule.
|
void |
setInclude(boolean include)
TODO What is this?
|
void |
setMessage(java.lang.String message)
Set the message to show when this Rule identifies a violation.
|
void |
setName(java.lang.String name)
Set the name of this Rule.
|
void |
setPriority(int priority)
Set the priority of this Rule.
|
void |
setRule(Rule rule) |
void |
setRuleClass(java.lang.String ruleClass)
Set the class of this Rule.
|
void |
setRuleSetName(java.lang.String name)
Set the name of the RuleSet containing this Rule.
|
void |
setSince(java.lang.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.
|
public void setRule(Rule rule)
public Rule getRule()
public java.lang.String getName()
Rulepublic void setName(java.lang.String name)
Rulepublic java.lang.String getSince()
Rulenull if not applicable.public void setSince(java.lang.String since)
Rulepublic java.lang.String getRuleClass()
RulegetRuleClass in interface Rulepublic void setRuleClass(java.lang.String ruleClass)
RulesetRuleClass in interface Rulepublic java.lang.String getRuleSetName()
RulegetRuleSetName in interface RuleRuleSetpublic void setRuleSetName(java.lang.String name)
RulesetRuleSetName in interface RuleRuleSetpublic java.lang.String getMessage()
RulegetMessage in interface Rulepublic void setMessage(java.lang.String message)
RulesetMessage in interface Rulepublic java.lang.String getDescription()
RulegetDescription in interface Rulepublic void setDescription(java.lang.String description)
RulesetDescription in interface Rulepublic java.util.List<java.lang.String> getExamples()
RulegetExamples in interface Rulepublic java.lang.String getExample()
RulegetExample in interface Rulepublic void addExample(java.lang.String example)
RuleaddExample in interface Rulepublic java.lang.String getExternalInfoUrl()
RulegetExternalInfoUrl in interface Rulepublic void setExternalInfoUrl(java.lang.String url)
RulesetExternalInfoUrl in interface Rulepublic int getPriority()
RulegetPriority in interface Rulepublic void setPriority(int priority)
RulesetPriority in interface Rulepublic java.lang.String getPriorityName()
RulegetPriorityName in interface Rulepublic boolean include()
Rulepublic void setInclude(boolean include)
RulesetInclude in interface Rulepublic java.util.Properties getProperties()
RulegetProperties in interface Rulepublic void addProperty(java.lang.String name,
java.lang.String property)
RuleaddProperty in interface Rulepublic void addProperties(java.util.Properties properties)
RuleaddProperties in interface Rulepublic boolean hasProperty(java.lang.String name)
RulehasProperty in interface Rulepublic boolean getBooleanProperty(java.lang.String name)
Ruleboolean value for the given property.getBooleanProperty in interface Rulepublic int getIntProperty(java.lang.String name)
Ruleint value for the given property.getIntProperty in interface Rulepublic double getDoubleProperty(java.lang.String name)
Ruledouble value for the given property.getDoubleProperty in interface Rulepublic java.lang.String getStringProperty(java.lang.String name)
Rulejava.util.String value for the given property.getStringProperty in interface Rulepublic PropertyDescriptor propertyDescriptorFor(java.lang.String name)
RulepropertyDescriptorFor in interface Rulepublic void setUsesDFA()
RulesetUsesDFA in interface Rulepublic boolean usesDFA()
Rulepublic void setUsesTypeResolution()
RulesetUsesTypeResolution in interface Rulepublic boolean usesTypeResolution()
RuleusesTypeResolution in interface Rulepublic boolean usesRuleChain()
RuleusesRuleChain in interface Rulepublic java.util.List<java.lang.String> getRuleChainVisits()
RulegetRuleChainVisits in interface Rulepublic void addRuleChainVisit(java.lang.String astNodeName)
RuleaddRuleChainVisit in interface Rulepublic void start(RuleContext ctx)
Rulepublic void apply(java.util.List astCompilationUnits,
RuleContext ctx)
Rulepublic void end(RuleContext ctx)
Rule