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