org.acm.seguin.pmd.rules.design
Class ExcessiveLengthRule

java.lang.Object
  extended by net.sourceforge.jrefactory.parser.JavaParserVisitorAdapter
      extended by org.acm.seguin.pmd.AbstractRule
          extended by org.acm.seguin.pmd.stat.StatisticalRule
              extended by org.acm.seguin.pmd.rules.design.ExcessiveLengthRule
All Implemented Interfaces:
net.sourceforge.jrefactory.parser.JavaParserVisitor, Rule
Direct Known Subclasses:
LongClassRule, LongMethodRule

public class ExcessiveLengthRule
extends StatisticalRule

This is a common super class for things which have excessive length. i.e. LongMethod and LongClass rules. To implement an ExcessiveLength rule, you pass in the Class of node you want to check, and this does the rest for you.


Field Summary
 
Fields inherited from class org.acm.seguin.pmd.stat.StatisticalRule
DELTA
 
Fields inherited from interface org.acm.seguin.pmd.Rule
LOWEST_PRIORITY, PRIORITIES
 
Constructor Summary
ExcessiveLengthRule(java.lang.Class nodeClass)
           
 
Method Summary
 java.lang.Object visit(net.sourceforge.jrefactory.ast.SimpleNode node, java.lang.Object data)
          To visit a node
 
Methods inherited from class org.acm.seguin.pmd.stat.StatisticalRule
addDataPoint, apply, applyMinimumValue, applyTopScore, getMean, getStdDev, makeViolations
 
Methods inherited from class org.acm.seguin.pmd.AbstractRule
addProperty, createRuleViolation, createRuleViolation, equals, getBooleanProperty, getDescription, getDoubleProperty, getExample, getIntProperty, getMessage, getName, getPriority, getPriorityName, getProperties, getStringProperty, hashCode, hasProperty, include, setDescription, setExample, setInclude, setMessage, setName, setPriority, visit, visitAll
 
Methods inherited from class net.sourceforge.jrefactory.parser.JavaParserVisitorAdapter
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, 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

ExcessiveLengthRule

public ExcessiveLengthRule(java.lang.Class nodeClass)
Method Detail

visit

public java.lang.Object visit(net.sourceforge.jrefactory.ast.SimpleNode node,
                              java.lang.Object data)
Description copied from class: net.sourceforge.jrefactory.parser.JavaParserVisitorAdapter
To visit a node

Specified by:
visit in interface net.sourceforge.jrefactory.parser.JavaParserVisitor
Overrides:
visit in class net.sourceforge.jrefactory.parser.JavaParserVisitorAdapter
Parameters:
node - The node we are visiting
data - The rename type data
Returns:
The rename type data