net.sourceforge.pmd
Class FooRule

java.lang.Object
  extended by net.sourceforge.pmd.AbstractPropertySource
      extended by net.sourceforge.pmd.lang.rule.AbstractRule
          extended by net.sourceforge.pmd.FooRule
All Implemented Interfaces:
PropertySource, Rule
Direct Known Subclasses:
MockStatisticalRule

public class FooRule
extends AbstractRule

Sample rule that detect any node with an image of "Foo". Used for testing.


Field Summary
 
Fields inherited from class net.sourceforge.pmd.AbstractPropertySource
propertyDescriptors, propertyValuesByDescriptor
 
Fields inherited from interface net.sourceforge.pmd.Rule
VIOLATION_SUPPRESS_REGEX_DESCRIPTOR, VIOLATION_SUPPRESS_XPATH_DESCRIPTOR
 
Constructor Summary
FooRule()
           
 
Method Summary
 void apply(List<? extends Node> nodes, RuleContext ctx)
           
protected  void apply(Node node, RuleContext ctx)
           
 String getDescription()
           
 String getMessage()
           
 String getName()
           
 String getRuleSetName()
           
 
Methods inherited from class net.sourceforge.pmd.lang.rule.AbstractRule
addExample, addRuleChainVisit, addRuleChainVisit, addViolation, addViolation, addViolation, addViolationWithMessage, addViolationWithMessage, addViolationWithMessage, deepCopyValuesTo, end, equals, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMinimumLanguageVersion, getParserOptions, getPriority, getRuleChainVisits, getRuleClass, getSince, hashCode, isDeprecated, setDeprecated, setDescription, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setName, setPriority, setRuleClass, setRuleSetName, setSince, setUsesDFA, setUsesTypeResolution, start, usesDFA, usesRuleChain, usesTypeResolution
 
Methods inherited from class net.sourceforge.pmd.AbstractPropertySource
copyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValues
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.pmd.PropertySource
definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValues
 

Constructor Detail

FooRule

public FooRule()
Method Detail

getMessage

public String getMessage()
Specified by:
getMessage in interface Rule
Overrides:
getMessage in class AbstractRule

getName

public String getName()
Specified by:
getName in interface Rule
Overrides:
getName in class AbstractRule

getRuleSetName

public String getRuleSetName()
Specified by:
getRuleSetName in interface Rule
Overrides:
getRuleSetName in class AbstractRule

getDescription

public String getDescription()
Specified by:
getDescription in interface Rule
Overrides:
getDescription in class AbstractRule

apply

public void apply(List<? extends Node> nodes,
                  RuleContext ctx)

apply

protected void apply(Node node,
                     RuleContext ctx)


Copyright © 2002–2015 InfoEther. All rights reserved.