KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > checks > coding > InputReturnCount


1 package com.puppycrawl.tools.checkstyle.checks.coding;
2
3 public class InputReturnCount
4 {
5     public boolean equals(Object JavaDoc obj) {
6         int i = 1;
7         switch (i) {
8         case 1: return true;
9         case 2: return true;
10         case 3: return true;
11         case 4: return true;
12         case 5: return true;
13         case 6: return true;
14         }
15         return false;
16     }
17
18     void foo(int i) {
19         switch (i) {
20         case 1: return;
21         case 2: return;
22         case 3: return;
23         case 4: return;
24         case 5: return;
25         case 6: return;
26         }
27         return;
28     }
29
30     void foo1(int i) {
31         if (i == 1) {
32             return;
33         }
34         Object JavaDoc obj = new Object JavaDoc() {
35                 void method1(int i) {
36                     switch (i) {
37                     case 1: return;
38                     case 2: return;
39                     case 3: return;
40                     case 4: return;
41                     case 5: return;
42                     }
43                     return;
44                 }
45             };
46         return;
47     }
48 }
49
50 class Test {
51
52     public Test() {}
53 }
54
Popular Tags