File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
inject-generator/src/main/java/io/avaje/inject/generator Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 10
10
final class Append {
11
11
12
12
private final Writer writer ;
13
+ private final StringBuilder stringBuilder = new StringBuilder ();
13
14
private int nameIndex ;
14
15
private boolean comma ;
15
16
private String extraIndent ;
@@ -27,8 +28,10 @@ Append indent(String content) {
27
28
try {
28
29
if (extraIndent != null ) {
29
30
writer .append (extraIndent );
31
+ stringBuilder .append (extraIndent );
30
32
}
31
33
writer .append (content );
34
+ stringBuilder .append (content );
32
35
return this ;
33
36
} catch (IOException e ) {
34
37
throw new UncheckedIOException (e );
@@ -38,6 +41,7 @@ Append indent(String content) {
38
41
Append append (String content ) {
39
42
try {
40
43
writer .append (content );
44
+ stringBuilder .append (content );
41
45
return this ;
42
46
} catch (IOException e ) {
43
47
throw new UncheckedIOException (e );
@@ -56,6 +60,7 @@ void close() {
56
60
Append eol () {
57
61
try {
58
62
writer .append ("\n " );
63
+ stringBuilder .append ("\n " );
59
64
return this ;
60
65
} catch (IOException e ) {
61
66
throw new UncheckedIOException (e );
@@ -86,4 +91,10 @@ void commaAppend(String name) {
86
91
}
87
92
append (name );
88
93
}
94
+
95
+
96
+ @ Override
97
+ public String toString () {
98
+ return stringBuilder .toString ();
99
+ }
89
100
}
You can’t perform that action at this time.
0 commit comments