View Javadoc
1   package com.google.checkstyle.test.chapter4formatting.rule42blockindentation; //indent:0 exp:0
2   
3   import java.util.ArrayList; //indent:0 exp:0
4   import java.util.HashMap; //indent:0 exp:0
5   import java.util.Iterator; //indent:0 exp:0
6   import java.util.List; //indent:0 exp:0
7   import java.util.Map; //indent:0 exp:0
8   
9   class InputIndentationCorrectForAndParameter { //indent:0 exp:0
10  
11    String getString(int someInt, String someString) { //indent:2 exp:2
12      return "String"; //indent:4 exp:4
13    } //indent:2 exp:2
14  
15    void fooMethodWithIf() { //indent:2 exp:2
16  
17      for (int i = 1; i < 10; i ++) {} //indent:4 exp:4
18  
19      for (int i = new SecondForClassWithLongName1("Loooooooooooooooooooo" //indent:4 exp:4
20          + "oong").getInteger(new FooForClass(), //indent:8 exp:8
21            getString(1000000000, "Loooooooooooooooong")); i < 10; i++) {} //indent:10 exp:>=8
22  
23      for (Map.Entry<String, String> entry : new SecondForClassWithLongName1("Loo" //indent:4 exp:4
24          + "ooooooooooooooooooooong").getMap(new //indent:8 exp:8
25          FooForClass(), 10000000, //indent:8 exp:8
26          getString(10000, "Loooooooooo" //indent:8 exp:8
27          + "ooooong")).entrySet()) {} //indent:8 exp:8
28  
29      for (Map.Entry<String, String> entry : new SecondForClassWithLongName1("Loo" //indent:4 exp:4
30          + "ooooooooooooooooooooong").getMap(new //indent:8 exp:8
31              FooForClass(), 10000000, //indent:12 exp:>=8
32            getString(10000, "Loooooooooo" //indent:10 exp:>=8
33                 + "ooooong")).entrySet()) {} //indent:15 exp:>=8
34  
35      for (String string : new SecondForClassWithLongName1(getString(1024 //indent:4 exp:4
36          , "Looooooooooooooooooong")). //indent:8 exp:8
37          getList(new FooForClass(), 1000, getString(1024, //indent:8 exp:8
38          "Loooooooooooooooooooooooooooooooo" //indent:8 exp:8
39          + "oooooooooooooooooooooooooooooooooooooooo" //indent:8 exp:8
40          + "oooooooooong"))) {} //indent:8 exp:8
41  
42      for (String string : new SecondForClassWithLongName1(getString(1024 //indent:4 exp:4
43          , "Looooooooooooooooooong")). //indent:8 exp:8
44              getList(new FooForClass(), 1000, getString(1024, //indent:12 exp:>=8
45                "Loooooooooooooooooooooooooooooooo" //indent:14 exp:>=8
46            + "oooooooooooooooooooooooooooooooooooooooo" //indent:10 exp:>=8
47               + "oooooooooong"))) {} //indent:13 exp:>=8
48  
49    } //indent:2 exp:2
50  
51    class InnerClassFoo { //indent:2 exp:2
52  
53      void fooMethodWithIf() { //indent:4 exp:4
54  
55        for (int i = 1; i < 10; i ++) {} //indent:6 exp:6
56  
57        for (int i = new SecondForClassWithLongName1("Loooooooooooooooooooo" //indent:6 exp:6
58            + "oong").getInteger(new FooForClass(), //indent:10 exp:10
59              getString(1000000000, "Loooooooooooooooong")); i < 10; i++) {} //indent:12 exp:>=10
60  
61        for (Map.Entry<String, String> entry : new SecondForClassWithLongName1("Loo" //indent:6 exp:6
62            + "ooooooooooooooooooooong").getMap(new //indent:10 exp:10
63            FooForClass(), 10000000, //indent:10 exp:10
64            getString(10000, "Loooooooooo" //indent:10 exp:10
65            + "ooooong")).entrySet()) {} //indent:10 exp:10
66  
67        for (Map.Entry<String, String> entry : new SecondForClassWithLongName1("Loo" //indent:6 exp:6
68              + "ooooooooooooooooooooong").getMap(new //indent:12 exp:>=10
69               FooForClass(), 10000000, //indent:13 exp:>=10
70                    getString(10000, "Loooooooooo" //indent:18 exp:>=10
71                 + "ooooong")).entrySet()) {} //indent:15 exp:>=10
72  
73        for (String string : new SecondForClassWithLongName1(getString(1024 //indent:6 exp:6
74            , "Looooooooooooooooooong")). //indent:10 exp:10
75            getList(new FooForClass(), 1000, getString(1024, //indent:10 exp:10
76            "Loooooooooooooooooooooooooooooooo" //indent:10 exp:10
77            + "oooooooooooooooooooooooooooooooooooooooo" //indent:10 exp:10
78            + "oooooooooong"))) {} //indent:10 exp:10
79  
80        for (String string : new SecondForClassWithLongName1(getString(1024 //indent:6 exp:6
81                 , "Looooooooooooooooooong")). //indent:15 exp:>=10
82               getList(new FooForClass(), 1000, getString(1024, //indent:13 exp:>=10
83                     "Loooooooooooooooooooooooooooooooo" //indent:19 exp:>=10
84                       + "oooooooooooooooooooooooooooooooooooooooo" //indent:21 exp:>=10
85            + "oooooooooong"))) {} //indent:10 exp:10
86      } //indent:4 exp:4
87    } //indent:2 exp:2
88  }  //indent:0 exp:0
89  
90  class SecondForClassWithLongName1 //indent:0 exp:0
91          implements Iterable<String>{ //indent:8 exp:>=4
92  
93    public SecondForClassWithLongName1(String string) { //indent:2 exp:2
94  
95    } //indent:2 exp:2
96  
97    int getInteger(FooForClass instance, String string) { //indent:2 exp:2
98      return -1;   //indent:4 exp:4
99    } //indent:2 exp:2
100 
101   Map<String, String> getMap(FooForClass instance, int integer, String string) { //indent:2 exp:2
102     return new HashMap<String, String>(); //indent:4 exp:4
103   } //indent:2 exp:2
104 
105   List<String> getList(FooForClass instance, long longLong, String string) { //indent:2 exp:2
106     return new ArrayList<String>(); //indent:4 exp:4
107   } //indent:2 exp:2
108 
109   public Iterator<String> iterator() { //indent:2 exp:2
110     return null; //indent:4 exp:4
111   } //indent:2 exp:2
112 } //indent:0 exp:0
113 class FooForClass {} //indent:0 exp:0