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 Detail

      • ExcessiveParameterListRule

        public ExcessiveParameterListRule()
    • Method Detail

      • 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>