View Javadoc
1 package net.sourceforge.pmd.rules.design; 2 3 import net.sourceforge.pmd.ast.ASTFormalParameter; 4 import net.sourceforge.pmd.ast.ASTFormalParameters; 5 6 /*** 7 * This rule detects an abnormally long parameter list. 8 * Note: This counts Nodes, and not necessarily parameters, 9 * so the numbers may not match up. (But topcount and sigma 10 * should work.) 11 */ 12 public class LongParameterListRule extends ExcessiveNodeCountRule { 13 public LongParameterListRule() { 14 super(ASTFormalParameters.class); 15 } 16 17 // Count these nodes, but no others. 18 public Object visit(ASTFormalParameter node, Object data) { 19 return new Integer(1); 20 } 21 }

This page was automatically generated by Maven