net.sourceforge.pmd

Interface Rule

public interface Rule

BSD-style license; for more info see http://pmd.sourceforge.net/license.html
Field Summary
static intLOWEST_PRIORITY
static String[]PRIORITIES
Method Summary
voidaddExample(String example)
voidaddProperties(Properties properties)
voidaddProperty(String name, String property)
voidaddRuleChainVisit(String astNodeName)
voidapply(List astCompilationUnits, RuleContext ctx)
booleangetBooleanProperty(String name)
StringgetDescription()
doublegetDoubleProperty(String name)
StringgetExample()
Still used by the JDeveloper plugin
List<String>getExamples()
StringgetExternalInfoUrl()
intgetIntProperty(String name)
StringgetMessage()
StringgetName()
intgetPriority()
StringgetPriorityName()
PropertiesgetProperties()
List<String>getRuleChainVisits()
StringgetRuleSetName()
StringgetStringProperty(String name)
booleanhasProperty(String name)
booleaninclude()
PropertyDescriptorpropertyDescriptorFor(String name)
voidsetDescription(String description)
voidsetExternalInfoUrl(String url)
voidsetInclude(boolean include)
voidsetMessage(String message)
voidsetName(String name)
voidsetPriority(int priority)
voidsetRuleSetName(String name)
voidsetUsesDFA()
voidsetUsesTypeResolution()
booleanusesDFA()
booleanusesRuleChain()
booleanusesTypeResolution()

Field Detail

LOWEST_PRIORITY

public static final int LOWEST_PRIORITY

PRIORITIES

public static final String[] PRIORITIES

Method Detail

addExample

public void addExample(String example)

addProperties

public void addProperties(Properties properties)

addProperty

public void addProperty(String name, String property)

addRuleChainVisit

public void addRuleChainVisit(String astNodeName)

apply

public void apply(List astCompilationUnits, RuleContext ctx)

getBooleanProperty

public boolean getBooleanProperty(String name)

getDescription

public String getDescription()

getDoubleProperty

public double getDoubleProperty(String name)

getExample

public String getExample()

Deprecated: use getExamples(), since we now support multiple examples

Still used by the JDeveloper plugin

getExamples

public List<String> getExamples()

getExternalInfoUrl

public String getExternalInfoUrl()

getIntProperty

public int getIntProperty(String name)

getMessage

public String getMessage()

getName

public String getName()

getPriority

public int getPriority()

getPriorityName

public String getPriorityName()

getProperties

public Properties getProperties()

getRuleChainVisits

public List<String> getRuleChainVisits()

getRuleSetName

public String getRuleSetName()

getStringProperty

public String getStringProperty(String name)

hasProperty

public boolean hasProperty(String name)

include

public boolean include()

propertyDescriptorFor

public PropertyDescriptor propertyDescriptorFor(String name)

setDescription

public void setDescription(String description)

setExternalInfoUrl

public void setExternalInfoUrl(String url)

setInclude

public void setInclude(boolean include)

setMessage

public void setMessage(String message)

setName

public void setName(String name)

setPriority

public void setPriority(int priority)

setRuleSetName

public void setRuleSetName(String name)

setUsesDFA

public void setUsesDFA()

setUsesTypeResolution

public void setUsesTypeResolution()

usesDFA

public boolean usesDFA()

usesRuleChain

public boolean usesRuleChain()

usesTypeResolution

public boolean usesTypeResolution()