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