View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.design.hideutilityclassconstructor;
2   
3   import java.io.Serializable;
4   
5   public class InputHideUtilityClassConstructorSerializableInnerStatic implements Serializable {
6       private static final long serialVersionUID = 1L;
7   
8       public InputHideUtilityClassConstructorSerializableInnerStatic(int i) {
9           // no code
10      }
11  
12      public String getValue() {
13          return "";
14      }
15      
16      // It is NOT Utility Inner class
17      @SuppressWarnings("unused")
18      public static class Event {
19          // Top level class have access to fields - no need in public getters
20          private String ind;
21          private String ind1;
22          
23          public Event(String value){
24              // do a lot of calculations
25          }
26          
27          // static because this method is utility
28          public static String getEmptyString() {
29              return "";
30          }
31      }
32      
33      // It is Utility Inner class
34      @SuppressWarnings("unused")
35      public static class Event1 {
36          private String ind;
37          private String ind1;
38          
39          private Event1(){
40              // do a lot of calculations
41          }
42          
43          // static because this method is utility
44          public static String getEmptyString() {
45              return "";
46          }
47      }
48  }