public void generateToFile(@NotNull JsProgram program, @NotNull File file) throws IOException { generateCode(program); FileWriter writer = new FileWriter(file); try { writer.write(output.toString()); } finally { writer.close(); } }
@NotNull public String generateToString(@NotNull JsProgram program) { generateCode(program); return output.toString(); }