|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pmd.jsp.ast.JspParserVisitorAdapter
net.sourceforge.pmd.jsp.rules.AbstractJspRule
public abstract class AbstractJspRule
Field Summary |
---|
Fields inherited from interface net.sourceforge.pmd.Rule |
---|
LOWEST_PRIORITY, PRIORITIES |
Constructor Summary | |
---|---|
AbstractJspRule()
|
Method Summary | |
---|---|
void |
addExample(java.lang.String example)
|
void |
addProperties(java.util.Properties properties)
|
void |
addProperty(java.lang.String name,
java.lang.String value)
|
void |
addRuleChainVisit(java.lang.String astNodeName)
|
protected void |
addViolation(java.lang.Object data,
Node node,
java.lang.Object[] args)
Adds a violation to the report. |
protected void |
addViolation(java.lang.Object data,
SimpleNode node)
Adds a violation to the report. |
protected void |
addViolation(java.lang.Object data,
SimpleNode node,
java.lang.String embed)
Adds a violation to the report. |
protected void |
addViolationWithMessage(java.lang.Object data,
SimpleNode node,
java.lang.String msg)
Adds a violation to the report. |
void |
apply(java.util.List acus,
RuleContext ctx)
|
boolean |
equals(java.lang.Object o)
Test if rules are equals. |
boolean |
getBooleanProperty(java.lang.String name)
|
java.lang.String |
getDescription()
|
double |
getDoubleProperty(java.lang.String name)
|
java.lang.String |
getExample()
Deprecated. use getExamples(), since we now support multiple examples |
java.util.List<java.lang.String> |
getExamples()
|
java.lang.String |
getExternalInfoUrl()
|
int |
getIntProperty(java.lang.String name)
|
java.lang.String |
getMessage()
|
java.lang.String |
getName()
|
int |
getPriority()
|
java.lang.String |
getPriorityName()
|
java.util.Properties |
getProperties()
|
java.util.List<java.lang.String> |
getRuleChainVisits()
|
java.lang.String |
getRuleSetName()
|
java.lang.String |
getStringProperty(java.lang.String name)
|
int |
hashCode()
Return a hash code to conform to equality. |
boolean |
hasProperty(java.lang.String name)
|
boolean |
include()
|
PropertyDescriptor |
propertyDescriptorFor(java.lang.String name)
|
void |
setDescription(java.lang.String description)
|
void |
setExternalInfoUrl(java.lang.String url)
|
void |
setInclude(boolean include)
|
void |
setMessage(java.lang.String message)
|
void |
setName(java.lang.String name)
|
void |
setPriority(int priority)
|
void |
setRuleSetName(java.lang.String ruleSetName)
|
void |
setUsesDFA()
|
void |
setUsesTypeResolution()
|
boolean |
usesDFA()
|
boolean |
usesRuleChain()
|
boolean |
usesTypeResolution()
|
protected void |
visitAll(java.util.List acus,
RuleContext ctx)
|
Methods inherited from class net.sourceforge.pmd.jsp.ast.JspParserVisitorAdapter |
---|
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractJspRule()
Method Detail |
---|
public java.lang.String getRuleSetName()
getRuleSetName
in interface Rule
public void setRuleSetName(java.lang.String ruleSetName)
setRuleSetName
in interface Rule
public java.lang.String getDescription()
getDescription
in interface Rule
public void setDescription(java.lang.String description)
setDescription
in interface Rule
public java.util.List<java.lang.String> getExamples()
getExamples
in interface Rule
public java.lang.String getExample()
getExample
in interface Rule
public void addExample(java.lang.String example)
addExample
in interface Rule
public boolean hasProperty(java.lang.String name)
hasProperty
in interface Rule
public void addProperty(java.lang.String name, java.lang.String value)
addProperty
in interface Rule
public void addProperties(java.util.Properties properties)
addProperties
in interface Rule
public double getDoubleProperty(java.lang.String name)
getDoubleProperty
in interface Rule
public int getIntProperty(java.lang.String name)
getIntProperty
in interface Rule
public boolean getBooleanProperty(java.lang.String name)
getBooleanProperty
in interface Rule
public java.lang.String getStringProperty(java.lang.String name)
getStringProperty
in interface Rule
public java.lang.String getName()
getName
in interface Rule
public void setName(java.lang.String name)
setName
in interface Rule
public java.lang.String getMessage()
getMessage
in interface Rule
public void setMessage(java.lang.String message)
setMessage
in interface Rule
public java.lang.String getExternalInfoUrl()
getExternalInfoUrl
in interface Rule
public void setExternalInfoUrl(java.lang.String url)
setExternalInfoUrl
in interface Rule
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void apply(java.util.List acus, RuleContext ctx)
apply
in interface Rule
public java.util.Properties getProperties()
getProperties
in interface Rule
public boolean include()
include
in interface Rule
public void setInclude(boolean include)
setInclude
in interface Rule
public int getPriority()
getPriority
in interface Rule
public java.lang.String getPriorityName()
getPriorityName
in interface Rule
public void setPriority(int priority)
setPriority
in interface Rule
public void setUsesDFA()
setUsesDFA
in interface Rule
public boolean usesDFA()
usesDFA
in interface Rule
public void setUsesTypeResolution()
setUsesTypeResolution
in interface Rule
public boolean usesTypeResolution()
usesTypeResolution
in interface Rule
protected void visitAll(java.util.List acus, RuleContext ctx)
protected final void addViolation(java.lang.Object data, SimpleNode node)
ctx
- the RuleContextnode
- the node that produces the violationprotected final void addViolationWithMessage(java.lang.Object data, SimpleNode node, java.lang.String msg)
ctx
- the RuleContextnode
- the node that produces the violationmsg
- specific message to put in the reportprotected final void addViolation(java.lang.Object data, SimpleNode node, java.lang.String embed)
ctx
- the RuleContextnode
- the node that produces the violationembed
- a variable to embed in the rule violation messageprotected final void addViolation(java.lang.Object data, Node node, java.lang.Object[] args)
ctx
- the RuleContextnode
- the node that produces the violation, may be null, in which case all line and column info will be set to zeroargs
- objects to embed in the rule violation messagepublic PropertyDescriptor propertyDescriptorFor(java.lang.String name)
propertyDescriptorFor
in interface Rule
public boolean usesRuleChain()
usesRuleChain
in interface Rule
public java.util.List<java.lang.String> getRuleChainVisits()
getRuleChainVisits
in interface Rule
public void addRuleChainVisit(java.lang.String astNodeName)
addRuleChainVisit
in interface Rule
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |