com.puppycrawl.tools.checkstyle.checks.sizes

Class ParameterNumberCheck

public class ParameterNumberCheck extends Check

Checks the number of parameters that a method or constructor has. The default allowable number of parameters is 7. To change the number of allowable parameters, set property max.

An example of how to configure the check is:

 <module name="ParameterNumber"/>
 

An example of how to configure the check to allow 10 parameters is:

 <module name="ParameterNumber">
    <property name="max" value="10"/>
 </module>
 

Version: 1.0

Author: Oliver Burn

Method Summary
int[]getDefaultTokens()
{@inheritDoc}
voidsetMax(int aMax)
Sets the maximum number of allowed parameters.
voidvisitToken(DetailAST aAST)
{@inheritDoc}

Method Detail

getDefaultTokens

public int[] getDefaultTokens()
{@inheritDoc}

setMax

public void setMax(int aMax)
Sets the maximum number of allowed parameters.

Parameters: aMax the max allowed parameters

visitToken

public void visitToken(DetailAST aAST)
{@inheritDoc}