KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > indentation > InputInvalidBlockIndent


1 /*
2  * InputValidBlockIndent.java
3  *
4  * Created on December 8, 2002, 12:06 PM
5  */

6
7 package com.puppycrawl.tools.checkstyle.indentation;
8
9 /**
10  *
11  * @author jrichard
12  */

13 public class InputInvalidBlockIndent {
14     
15     /** Creates a new instance of InputValidBlockIndent */
16     public InputInvalidBlockIndent() {
17     }
18     
19     public void method1() {
20         
21         { }
22        { }
23          { }
24        
25          {
26        }
27          
28       {
29             
30       }
31       {
32         }
33       
34          {
35              int var = 3;
36             
37              var += 3;
38          }
39
40         
41       {
42           int var = 3;
43             
44           var += 3;
45       }
46         
47         
48       { int var = 5; }
49     
50         {
51           int var = 3;
52             
53             var += 3;
54             
55           {
56                 int innerVar = 4;
57                 
58                 innerVar += var;
59           }
60         }
61         {
62             int var = 3;
63             
64           var += 3;
65             
66           {
67               int innerVar = 4;
68                 
69                 innerVar += var;
70             }
71         }
72         
73         {
74             int var = 3;
75             
76             var += 3;
77             
78             {
79                 int innerVar = 4;
80                 
81                 innerVar += var;
82           }
83         }
84     
85     }
86
87
88 // static init at beginning of line is broken for now
89

90     
91   static { int var = 4; }
92       static { int var = 4; }
93
94     
95     static {
96        int var = 4;
97     }
98
99       static {
100         int var = 4;
101   }
102     
103   static {
104         int var = 4;
105       }
106     
107   static
108     {
109       int var = 4;
110     }
111     static
112   {
113       int var = 4;
114       }
115
116
117     static
118     {
119       int var = 4;
120     }
121
122     static
123     {
124     int var = 4;
125   }
126
127     static
128     {
129         int var = 4;
130       }
131
132  
133   { int var = 4; }
134       { int var = 4; }
135
136     
137   {
138         int var = 4;
139       }
140     
141       {
142         int var = 4;
143   }
144     
145     {
146       int var = 4;
147     }
148     
149 }
150
Popular Tags