View Javadoc
1   package com.puppycrawl.tools.checkstyle.checks.indentation.indentation; //indent:0 exp:0
2   
3   
4   /**                                                                           //indent:0 exp:0
5    * This test-input is intended to be checked using following configuration:   //indent:1 exp:1
6    *                                                                            //indent:1 exp:1
7    * arrayInitIndent = 4                                                        //indent:1 exp:1
8    * basicOffset = 4                                                            //indent:1 exp:1
9    * braceAdjustment = 0                                                        //indent:1 exp:1
10   * caseIndent = 4                                                             //indent:1 exp:1
11   * forceStrictCondition = false                                               //indent:1 exp:1
12   * lineWrappingIndentation = 4                                                //indent:1 exp:1
13   * tabWidth = 4                                                               //indent:1 exp:1
14   * throwsIndent = 4                                                           //indent:1 exp:1
15   *                                                                            //indent:1 exp:1
16   *                                                                            //indent:1 exp:1
17   */                                                                           //indent:1 exp:1
18  public class InputIndentationMethodCallLineWrap { //indent:0 exp:0
19  
20      void foo() { //indent:4 exp:4
21          new String() //indent:8 exp:8
22              .substring( //indent:12 exp:12
23                  0, 100 //indent:16 exp:16
24              ) //indent:12 exp:12
25              .substring( //indent:12 exp:12
26                  0, 50 //indent:16 exp:16
27              ); //indent:12 exp:12
28      } //indent:4 exp:4
29  
30      class InnerFoo { //indent:4 exp:4
31  
32      	void foo() { //indent:8 exp:8
33              new String() //indent:12 exp:12
34                  .substring( //indent:16 exp:16
35                      0, 100 //indent:20 exp:20
36                  ) //indent:16 exp:16
37                  .substring( //indent:16 exp:16
38                      0, 50 //indent:20 exp:20
39                  ); //indent:16 exp:16
40          } //indent:8 exp:8
41      } //indent:4 exp:4
42  
43      InnerFoo anon = new InnerFoo() { //indent:4 exp:4
44  
45      	void foo() { //indent:8 exp:8
46              new String() //indent:12 exp:12
47                  .substring( //indent:16 exp:16
48                      0, 100 //indent:20 exp:20
49                  ) //indent:16 exp:16
50                  .substring( //indent:16 exp:16
51                    0, 50 //indent:18 exp:20 warn
52                ); //indent:14 exp:16 warn
53          } //indent:8 exp:8
54      }; //indent:4 exp:4
55  
56      void chaining() { //indent:4 exp:4
57          toString() //indent:8 exp:8
58                  .getClass(); //indent:16 exp:16
59          toString().contains(//indent:8 exp:8
60              new String(//indent:12 exp:12
61                      "a" //indent:20 exp:20
62              )//indent:12 exp:12
63          ); //indent:8 exp:8
64      } //indent:4 exp:4
65  } //indent:0 exp:0