1
2
3
4
5
6
7 package com.puppycrawl.tools.checkstyle.checks.modifier.modifierorder;
8
9
10
11
12
13
14
15 strictfp final class InputModifierOrderIt
16 {
17
18
19 static private boolean sModifierOrderVar = false;
20
21
22
23
24
25 strictfp private void doStuff()
26 {
27 }
28
29
30 @MyAnnotation2 void someMethod()
31 {
32 }
33
34
35 private @MyAnnotation2 void someMethod2()
36 {
37 }
38
39
40 private @MyAnnotation2 strictfp void someMethod3()
41 {
42 }
43
44
45 @MyAnnotation2 private strictfp void someMethod4()
46 {
47 }
48
49
50 @MyAnnotation2 private static @MyAnnotation4 strictfp void someMethod5()
51 {
52 }
53
54
55 public static interface InputRedundantPublicModifier
56 {
57
58 public void a();
59
60
61 void b();
62
63
64 abstract void c();
65
66
67 public float PI_PUBLIC = (float) 3.14;
68
69
70
71
72
73 final float PI_FINAL = (float) 3.14;
74
75
76 float PI_OK = (float) 3.14;
77 }
78
79
80 private final void method()
81 {
82 }
83 }
84
85
86 final class RedundantFinalClass
87 {
88
89 public final void finalMethod()
90 {
91 }
92
93
94 public void method()
95 {
96 }
97 }
98
99
100 abstract interface InnerImplementation
101 {
102 InnerImplementation inner =
103 new InnerImplementation()
104 {
105
106 public void method()
107 {
108 }
109 };
110
111 void method();
112 }
113
114
115 @interface Annotation
116 {
117 public String s1 = "";
118 final String s2 = "";
119 static String s3 = "";
120 String s4 = "";
121 public String blah();
122 abstract String blah2();
123 }
124
125 @interface MyAnnotation2 {
126 }
127
128 @interface MyAnnotation4 {
129 }
130
131 class SafeVarargsUsage {
132 @Deprecated
133 @SafeVarargs
134 private final void foo(int... k) {}
135
136 @Deprecated
137 @SafeVarargs
138 @SuppressWarnings("")
139 private final void foo1(Object... obj) {}
140 }
141
142 enum TestEnum {
143 ;
144
145 public void method() {
146 }
147 }
148
149
150 interface InputDefaultPublicModifier
151 {
152
153 default strictfp void a()
154 {
155 }
156
157
158 strictfp default void b()
159 {
160 }
161 }