View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="ParameterNumber">
5         <property name="ignoreAnnotatedBy" value="JsonCreator"/>
6       </module>
7     </module>
8   </module>
9   */
10  
11  package com.puppycrawl.tools.checkstyle.checks.sizes.parameternumber;
12  
13  // xdoc section -- start
14  class Example4 extends ExternalService4 {
15  
16    @JsonCreator
17    // ok below, constructor annotated with JsonCreator annotation is ignored
18    Example4(int a, int b, int c, int d,
19             int e, int f, int g, int h) {}
20  
21    // violation below, 'More than 7 parameters (found 8)'
22    Example4(String a, String b, String c, String d,
23             String e, String f, String g, String h) {}
24  
25    @Override
26    // violation below, 'More than 7 parameters (found 8)'
27    public void processData(String a, String b, String c, String d,
28                            String e, String f, String g, String h) {}
29  
30  }
31  
32  class ExternalService4 {
33  
34    // violation below, 'More than 7 parameters (found 8)'
35    public void processData(String a, String b, String c, String d,
36                            String e, String f, String g, String h) {}
37  
38  }
39  // xdoc section -- end