|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pmd.AbstractDelegateRule
public class AbstractDelegateRule
Base class for Rule implementations which delegate to another Rule instance.
Field Summary |
---|
Fields inherited from interface net.sourceforge.pmd.Rule |
---|
LOWEST_PRIORITY, PRIORITIES |
Constructor Summary | |
---|---|
AbstractDelegateRule()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractDelegateRule()
Method Detail |
---|
public void setRule(Rule rule)
public Rule getRule()
public java.lang.String getName()
Rule
getName
in interface Rule
public void setName(java.lang.String name)
Rule
setName
in interface Rule
public java.lang.String getSince()
Rule
null
if not applicable.
getSince
in interface Rule
public void setSince(java.lang.String since)
Rule
setSince
in interface Rule
public java.lang.String getRuleClass()
Rule
getRuleClass
in interface Rule
public void setRuleClass(java.lang.String ruleClass)
Rule
setRuleClass
in interface Rule
public java.lang.String getRuleSetName()
Rule
getRuleSetName
in interface Rule
RuleSet
public void setRuleSetName(java.lang.String name)
Rule
setRuleSetName
in interface Rule
RuleSet
public java.lang.String getMessage()
Rule
getMessage
in interface Rule
public void setMessage(java.lang.String message)
Rule
setMessage
in interface Rule
public java.lang.String getDescription()
Rule
getDescription
in interface Rule
public void setDescription(java.lang.String description)
Rule
setDescription
in interface Rule
public java.util.List<java.lang.String> getExamples()
Rule
getExamples
in interface Rule
public java.lang.String getExample()
Rule
getExample
in interface Rule
public void addExample(java.lang.String example)
Rule
addExample
in interface Rule
public java.lang.String getExternalInfoUrl()
Rule
getExternalInfoUrl
in interface Rule
public void setExternalInfoUrl(java.lang.String url)
Rule
setExternalInfoUrl
in interface Rule
public int getPriority()
Rule
getPriority
in interface Rule
public void setPriority(int priority)
Rule
setPriority
in interface Rule
public java.lang.String getPriorityName()
Rule
getPriorityName
in interface Rule
public boolean include()
Rule
include
in interface Rule
public void setInclude(boolean include)
Rule
setInclude
in interface Rule
public java.util.Properties getProperties()
Rule
getProperties
in interface Rule
public void addProperty(java.lang.String name, java.lang.String property)
Rule
addProperty
in interface Rule
public void addProperties(java.util.Properties properties)
Rule
addProperties
in interface Rule
public boolean hasProperty(java.lang.String name)
Rule
hasProperty
in interface Rule
public boolean getBooleanProperty(java.lang.String name)
Rule
boolean
value for the given property.
getBooleanProperty
in interface Rule
public int getIntProperty(java.lang.String name)
Rule
int
value for the given property.
getIntProperty
in interface Rule
public double getDoubleProperty(java.lang.String name)
Rule
double
value for the given property.
getDoubleProperty
in interface Rule
public java.lang.String getStringProperty(java.lang.String name)
Rule
java.util.String
value for the given property.
getStringProperty
in interface Rule
public PropertyDescriptor propertyDescriptorFor(java.lang.String name)
Rule
propertyDescriptorFor
in interface Rule
public void setUsesDFA()
Rule
setUsesDFA
in interface Rule
public boolean usesDFA()
Rule
usesDFA
in interface Rule
public void setUsesTypeResolution()
Rule
setUsesTypeResolution
in interface Rule
public boolean usesTypeResolution()
Rule
usesTypeResolution
in interface Rule
public boolean usesRuleChain()
Rule
usesRuleChain
in interface Rule
public java.util.List<java.lang.String> getRuleChainVisits()
Rule
getRuleChainVisits
in interface Rule
public void addRuleChainVisit(java.lang.String astNodeName)
Rule
addRuleChainVisit
in interface Rule
public void start(RuleContext ctx)
Rule
start
in interface Rule
public void apply(java.util.List astCompilationUnits, RuleContext ctx)
Rule
apply
in interface Rule
public void end(RuleContext ctx)
Rule
end
in interface Rule
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |