View Javadoc
1   package com.google.checkstyle.test.chapter4formatting.rule452indentcontinuationlines; //indent:0 exp:0
2   
3   class InputIndentationCorrectFieldAndParameter { //indent:0 exp:0
4   
5     boolean flag = conditionFirst("Loooooooooooooooooong", new //indent:2 exp:2
6         SecondFieldWithName("Loooooooooooooooooog"). //indent:6 exp:6
7         getInteger(new FooFieldClass(), "Loooooooooooooooooog"), //indent:6 exp:6
8         new InnerClassFoo()); //indent:6 exp:6
9   
10    boolean secondFlag = conditionSecond(10000000000.0, new //indent:2 exp:2
11        SecondFieldWithName("Looooooooooooo" //indent:6 exp:6
12        + "oooooooooooong").getString(new FooFieldClass(), //indent:6 exp:6
13        new SecondFieldWithName("loooooooooong"). //indent:6 exp:6
14        getInteger(new FooFieldClass(), "loooooooooooooong")), "loooooooooooong") //indent:6 exp:6
15        || conditionThird(2048) || conditionFourth(new //indent:6 exp:6
16        SecondFieldWithName("Looooooooooooooo" //indent:6 exp:6
17        + "ooooooooooooong").getBoolean(new FooFieldClass(), false)) || //indent:6 exp:6
18        conditionFifth(true, new SecondFieldWithName(getString(2048, "Looo" //indent:6 exp:6
19        + "ooooooooooooooooooooooooooooooooooooooooooong")).getBoolean( //indent:6 exp:6
20        new FooFieldClass(), true)) || conditionSixth(false, new //indent:6 exp:6
21        SecondFieldWithName(getString(100000, "Loooooong" //indent:6 exp:6
22        + "Fooooooo><"))) || conditionNoArg() //indent:6 exp:6
23        || conditionNoArg() || //indent:6 exp:6
24        conditionNoArg() || conditionNoArg(); //indent:6 exp:6
25  
26    String getString(int someInt, String someString) { //indent:2 exp:2
27      return "String"; //indent:4 exp:4
28    } //indent:2 exp:2
29  
30    private boolean conditionFirst(String longString, int //indent:2 exp:2
31        integer, InnerClassFoo someInstance) { //indent:6 exp:6
32      return false; //indent:4 exp:4
33    } //indent:2 exp:2
34  
35    private boolean conditionSecond(double longLongLongDoubleValue, //indent:2 exp:2
36        String longLongLongString, String secondLongLongString) { //indent:6 exp:6
37      return false; //indent:4 exp:4
38    } //indent:2 exp:2
39  
40    private boolean conditionThird(long veryLongValue) { //indent:2 exp:2
41      return false; //indent:4 exp:4
42    } //indent:2 exp:2
43  
44    private boolean conditionFourth(boolean flag) { //indent:2 exp:2
45      return false; //indent:4 exp:4
46    } //indent:2 exp:2
47  
48    private boolean conditionFifth(boolean flag1, boolean flag2) { //indent:2 exp:2
49      return false; //indent:4 exp:4
50    } //indent:2 exp:2
51  
52    private boolean conditionSixth(boolean flag, //indent:2 exp:2
53        SecondFieldWithName instance) { //indent:6 exp:6
54      return false; //indent:4 exp:4
55    } //indent:2 exp:2
56  
57    private boolean conditionNoArg() { //indent:2 exp:2
58      return false; //indent:4 exp:4
59    } //indent:2 exp:2
60  
61    class InnerClassFoo { //indent:2 exp:2
62  
63      boolean flag = conditionFirst("Loooooooooooooooooong", new //indent:4 exp:4
64          SecondFieldWithName("Loooooooooooooooooog"). //indent:8 exp:8
65              getInteger(new FooFieldClass(), "Loooooooooooooooooog"), //indent:12 exp:>=8
66               new InnerClassFoo()); //indent:13 exp:>=8
67  
68      boolean secondFlag = conditionSecond(10000000000.0, new //indent:4 exp:4
69          SecondFieldWithName("Looooooooooooo" //indent:8 exp:8
70             + "oooooooooooong").getString(new FooFieldClass(), //indent:11 exp:>=8
71            new SecondFieldWithName("loooooooooong"). //indent:10 exp:>=8
72              getInteger(new FooFieldClass(), "looooooooong")), "loooooooooooong") //indent:12 exp:>=8
73               || conditionThird(2048) || conditionFourth(new //indent:13 exp:>=8
74                  SecondFieldWithName("Looooooooooooooo" //indent:16 exp:>=8
75              + "ooooooooooooong").getBoolean(new FooFieldClass(), false)) || //indent:12 exp:>=8
76             conditionFifth(true, new SecondFieldWithName(getString(2048, "Looo" //indent:11 exp:>=8
77                 + "ooooooooooooooooooooooooooooooooooooooooooong")).getBoolean( //indent:15 exp:>=8
78              new FooFieldClass(), true)) || conditionSixth(false, new //indent:12 exp:>=8
79              SecondFieldWithName(getString(100000, "Loooooong" //indent:12 exp:>=8
80                  + "Fooooooo><"))) || conditionNoArg() //indent:16 exp:>=8
81            || conditionNoArg() || //indent:10 exp:>=8
82            conditionNoArg() || conditionNoArg(); //indent:10 exp:>=8
83  
84      FooFieldClass anonymousClass = new FooFieldClass() { //indent:4 exp:4
85        boolean secondFlag = conditionSecond(10000000000.0, new //indent:6 exp:6
86            SecondFieldWithName("Looooooooooooo" //indent:10 exp:10
87              + "oooooooooooong").getString(new FooFieldClass(), //indent:12 exp:>=10
88                 new SecondFieldWithName("loooooooooong"). //indent:15 exp:>=10
89               getInteger(new FooFieldClass(), "looooooong")), "loooooooooooong") //indent:13 exp:>=10
90                || conditionThird(2048) || conditionFourth(new //indent:14 exp:>=10
91                   SecondFieldWithName("Looooooooooooooo" //indent:17 exp:>=10
92               + "ooooooooooooong").getBoolean(new FooFieldClass(), false)) || //indent:13 exp:>=10
93              conditionFifth(true, new SecondFieldWithName(getString(2048, "Looo" //indent:12 exp:>=10
94                  + "ooooooooooooooooooooooooooooooooooooooooooong")).getBoolean( //indent:16 exp:>=10
95               new FooFieldClass(), true)) || conditionSixth(false, new //indent:13 exp:>=8
96               SecondFieldWithName(getString(100000, "Loooooong" //indent:13 exp:>=10
97                   + "Fooooooo><"))) || conditionNoArg() //indent:17 exp:>=10
98             || conditionNoArg() || //indent:11 exp:>=10
99             conditionNoArg() || conditionNoArg(); //indent:11 exp:>=10
100     }; //indent:4 exp:4
101   } //indent:2 exp:2
102 } //indent:0 exp:0
103 
104 class SecondFieldWithName { //indent:0 exp:0
105 
106   public SecondFieldWithName(String string) { //indent:2 exp:2
107 
108   } //indent:2 exp:2
109 
110   String getString(FooFieldClass instance, int integer) { //indent:2 exp:2
111     return "String"; //indent:4 exp:4
112   } //indent:2 exp:2
113 
114   int getInteger(FooFieldClass instance, String string) { //indent:2 exp:2
115     return -1;   //indent:4 exp:4
116   } //indent:2 exp:2
117 
118   boolean getBoolean(FooFieldClass instance, boolean flag) { //indent:2 exp:2
119     return false; //indent:4 exp:4
120   } //indent:2 exp:2
121 
122   SecondFieldWithName getInstance() { //indent:2 exp:2
123     return new SecondFieldWithName("VeryLoooooooooo" //indent:4 exp:4
124         + "oongString"); //indent:8 exp:8
125   } //indent:2 exp:2
126 } //indent:0 exp:0
127 class FooFieldClass {} //indent:0 exp:0