View Javadoc
1   /*
2   MethodCount
3   maxTotal = 3
4   maxPrivate = 3
5   maxPackage = 3
6   maxProtected = 3
7   maxPublic = 3
8   tokens = (default)CLASS_DEF, ENUM_CONSTANT_DEF, ENUM_DEF, INTERFACE_DEF, ANNOTATION_DEF, RECORD_DEF
9   
10  */
11  
12  package com.puppycrawl.tools.checkstyle.checks.sizes.methodcount;
13  
14  public class InputMethodCount1Two { // 3 violations
15  
16    /**
17     * Dummy inner class to check that the inner-classes methods are not counted
18     * for the outer class.
19     */
20    protected class PublicMethodsInnerclassInnerclass { // 2 violations
21      /**
22       * Dummy method doing nothing
23       */
24      protected void doNothing50() {
25      }
26  
27      /**
28       * Dummy method doing nothing
29       */
30      protected void doNothing51() {
31      }
32  
33      /**
34       * Dummy method doing nothing
35       */
36      protected void doNothing52() {
37      }
38  
39      /**
40       * Dummy method doing nothing
41       */
42      protected void doNothing53() {
43      }
44    }
45  
46    /**
47     * Dummy inner class to check that the inner-classes methods are not counted
48     * for the outer class.
49     */
50    public interface PublicMethodsInnerInterface { // 2 violations
51  
52      /**
53       * Dummy method doing nothing
54       */
55      public void doNothing61();
56  
57      /**
58       * Dummy method doing nothing
59       */
60      public abstract void doNothing62();
61  
62      /**
63       * Dummy method doing nothing
64       */
65      abstract void doNothing63();
66  
67      /**
68       * Dummy method doing nothing
69       */
70      void doNothing64();
71    }
72  
73    /**
74     * Dummy method doing nothing
75     */
76    private void doNothing31() {
77    }
78  
79    /**
80     * Dummy method doing nothing
81     */
82    private void doNothing32() {
83    }
84  
85    /**
86     * Dummy method doing nothing
87     */
88    private void doNothing33() {
89    }
90  
91    /**
92     * Dummy method doing nothing
93     */
94    private void doNothing34() {
95    }
96    /**
97     * Dummy method doing nothing
98     */
99    void doNothing20() {
100   }
101 
102   /**
103    * Dummy method doing nothing
104    */
105   void doNothing21() {
106   }
107 
108   /**
109    * Dummy method doing nothing
110    */
111   void doNothing22() {
112   }
113 
114   /**
115    * Dummy method doing nothing
116    */
117   void doNothing23() {
118   }
119 }