code: public static void emitCode(File outputFolder, String fileName, String code,
  			String encoding)
  	{
  		try
  		{
  			File javaFile = new File(outputFolder, File.separator + fileName);
  			javaFile.getParentFile().mkdirs();
  			javaFile.createNewFile();
  			PrintWriter writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(javaFile, false), encoding));
  			BufferedWriter out = new BufferedWriter(writer);
  			out.write(code);
  			out.close();
  
  		} catch (IOException e)
  		{
  			log.error("Error when saving class file: " + fileName);
  			e.printStackTrace();
  		}
  	}
docs: Emits generated code to a file.
  
  @param outputFolder
  outputFolder The output folder that will store the generated code.
  @param fileName
  The name of the file that will store the generated code.
  @param code
  The generated code.
  @param encoding
  The encoding to use for the generated code.