Override write(String) so we don't have to decompose the String into a char[] just to add it back to the StringBuilder
@@ -58,6 +58,11 @@ final class FormattingJavaFileObject extends ForwardingJavaFileObject<JavaFileOb
stringBuilder.append(chars, start, end - start);
}
+ @Override
+ public void write(String string) throws IOException {
+ stringBuilder.append(string);
+ }
+
@Override
public void flush() throws IOException {}
