View Javadoc
1   /*
2   MethodCount
3   maxTotal = (default)100
4   maxPrivate = (default)100
5   maxPackage = (default)100
6   maxProtected = (default)100
7   maxPublic = 1
8   tokens = ENUM_DEF, CLASS_DEF
9   
10  
11  */
12  
13  package com.puppycrawl.tools.checkstyle.checks.sizes.methodcount;
14  
15  public interface InputMethodCountInterfaceMemberScopeIsPublic {
16  
17      enum Enum { // violation 'Number of public methods is 2 (max allowed is 1).'
18  
19          ;
20  
21          public static void method1() {}
22  
23          public static void method2() {}
24  
25      }
26  
27      class Class { // violation 'Number of public methods is 2 (max allowed is 1).'
28  
29          public void method1() {}
30  
31          public void method2() {}
32  
33      }
34  
35  }