Class ExcessiveParameterListRule

All Implemented Interfaces:
AstVisitor, JavaVisitor, Rule, 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

      @Deprecated protected boolean isViolation(ASTFormalParameters node, int reportLevel)
      Deprecated.
      since 7.18.0. This method is not used anymore and shouldn't be implemented.
    • getMetric

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