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