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

This page was automatically generated by Maven