1
2
3
4
5
6
7
8
9
10
11
12
13 package com.puppycrawl.tools.checkstyle.checks.coding.hiddenfield;
14
15 import java.util.Comparator;
16
17 public class InputHiddenFieldStaticVisibility {
18 static int someField;
19 static Object other = null;
20 Object field = null;
21
22 static void method(Object field, Object other) {
23
24
25 }
26
27 static class B {
28 void method(Object field, Object other) {
29
30
31 }
32 }
33
34 static Comparator<Object> COMP = new Comparator<Object>() {
35 @Override
36 public int compare(Object field, Object other) {
37
38
39 return 0;
40 }
41 };
42
43 static Comparator<Object> createComp() {
44 return new Comparator<Object>() {
45 @Override
46 public int compare(Object field, Object other) {
47
48
49 return 0;
50 }
51 };
52 }
53
54 static void foo1(int a) {}
55
56 void foo2(int a) {}
57
58 static void foo3(int someField) {}
59 }