Class ExcessiveParameterListRule

java.lang.Object
net.sourceforge.pmd.properties.AbstractPropertySource
net.sourceforge.pmd.lang.rule.AbstractRule
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule
net.sourceforge.pmd.lang.java.rule.AbstractJavaRulechainRule
net.sourceforge.pmd.lang.java.rule.internal.AbstractJavaCounterCheckRule<ASTFormalParameters>
net.sourceforge.pmd.lang.java.rule.design.ExcessiveParameterListRule
All Implemented Interfaces:
net.sourceforge.pmd.lang.ast.AstVisitor, JavaVisitor, net.sourceforge.pmd.lang.rule.Rule, net.sourceforge.pmd.properties.PropertySource

public class ExcessiveParameterListRule extends net.sourceforge.pmd.lang.java.rule.internal.AbstractJavaCounterCheckRule<ASTFormalParameters>
This rule detects an abnormally long parameter list. Note: This counts Nodes, and not necessarily parameters, so the numbers may not match up. (But topcount and sigma should work.)
  • Constructor Details

    • ExcessiveParameterListRule

      public ExcessiveParameterListRule()
  • Method Details

    • defaultReportLevel

      protected int defaultReportLevel()
      Specified by:
      defaultReportLevel in class net.sourceforge.pmd.lang.java.rule.internal.AbstractJavaCounterCheckRule<ASTFormalParameters>
    • isIgnored

      protected boolean isIgnored(ASTFormalParameters node)
      Description copied from class: net.sourceforge.pmd.lang.java.rule.internal.AbstractJavaCounterCheckRule
      Return true if the node should be ignored.
      Overrides:
      isIgnored in class net.sourceforge.pmd.lang.java.rule.internal.AbstractJavaCounterCheckRule<ASTFormalParameters>
    • isViolation

      protected boolean isViolation(ASTFormalParameters node, int reportLevel)
      Specified by:
      isViolation in class net.sourceforge.pmd.lang.java.rule.internal.AbstractJavaCounterCheckRule<ASTFormalParameters>