aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources/com/puppycrawl/tools/checkstyle/checks/design/InputHideUtilityClassConstructor3041574_3.java
blob: c65e3b0161413c83d7eead37e65a106aea2b939f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.puppycrawl.tools.checkstyle.checks.design;

import java.io.Serializable;

public class InputHideUtilityClassConstructor3041574_3 implements Serializable {
    private static final long serialVersionUID = 1L;

    public InputHideUtilityClassConstructor3041574_3(int i) {
        // no code
    }

    public String getValue() {
        return "";
    }
    
    // It is NOT Utility Inner class
    @SuppressWarnings("unused")
    public static class Event {
        // Top level class have access to fields - no need in public getters
        private String ind;
        private String ind1;
        
        public Event(String value){
            // do a lot of calculations
        }
        
        // static because this method is utility
        public static String getEmptyString() {
            return "";
        }
    }
    
    // It is Utility Inner class
    @SuppressWarnings("unused")
    public static class Event1 {
        private String ind;
        private String ind1;
        
        private Event1(){
            // do a lot of calculations
        }
        
        // static because this method is utility
        public static String getEmptyString() {
            return "";
        }
    }
}