1
2
3
4
5
6
7 package com.puppycrawl.tools.checkstyle.checks.coding.overloadmethodsdeclarationorder;
8
9 class InputOverloadMethodsDeclarationOrder
10 {
11 public void overloadMethod(int i)
12 {
13
14 }
15
16 public void overloadMethod(String s)
17 {
18
19 }
20
21 public void overloadMethod(boolean b)
22 {
23
24 }
25
26 public void fooMethod()
27 {
28
29 }
30
31
32
33 public void overloadMethod(String s, Boolean b, int i)
34 {
35
36 }
37
38 InputOverloadMethodsDeclarationOrder anonymous = new InputOverloadMethodsDeclarationOrder()
39 {
40 public void overloadMethod(int i)
41 {
42
43 }
44
45 public void overloadMethod(String s)
46 {
47
48 }
49
50 public void overloadMethod(boolean b)
51 {
52
53 }
54
55 public void fooMethod()
56 {
57
58 }
59
60
61
62 public void overloadMethod(String s, Boolean b, int i)
63 {
64
65 };
66
67 public void overloadMethod(double d)
68 {
69
70
71
72
73
74
75
76 }
77 };
78 }
79
80 interface Fooable
81 {
82 public abstract void foo(int i);
83 public abstract void foo(String s);
84 public abstract void noFoo();
85
86
87 public abstract void foo(String s, Boolean b, int i);
88 }
89
90 enum FooType {
91 Strategy(""),
92 Shooter(""),
93 RPG("");
94
95 private String description;
96
97 private FooType(String description) {
98 this.description = description;
99 }
100
101 public String getDescription() {
102 return description;
103 }
104
105 public void setDescription(String description) {
106 this.description = description;
107 }
108
109 public void overloadMethod(int i)
110 {
111
112 }
113
114 public void overloadMethod(String s)
115 {
116
117 }
118
119
120 public void overloadMethod(boolean b)
121 {
122
123 }
124
125 public void fooMethod()
126 {
127
128 }
129
130
131
132 public void overloadMethod(String s, Boolean b, int i)
133 {
134
135 }
136
137 void test() {}
138
139 String str;
140
141 private interface Testing {}
142
143
144 void test(int x) {}
145
146 private class Inner {
147 void test() {}
148
149 void test(String str) {}
150
151 void test2() {}
152
153 String str;
154
155
156 void test(int x) {}
157 }
158
159 void test(double d) {}
160 }
161
162 enum Foo2 {
163 VALUE {
164 public void value() {
165 value("");
166 }
167
168 public void middle() {
169 }
170
171 public void value(String s) {
172 }
173 };
174 }
175
176 @interface ClassPreamble {
177 String author();
178 }