@Override
    public void flush() {

        PrintWriter out = null;
        try {
            try {
                out = new PrintWriter(Utils.createFile(dir, file), "UTF-8");
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
            String contents = getBuffer().toString();
            out.write(processor.apply(contents));
        } finally {
            closeQuietly(out);
        }
    }
@ Override public void flush ( ) { PrintWriter out = null ; try { try { out = new PrintWriter ( Utils . createFile ( dir , file ) , "UTF-8" ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } String contents = getBuffer ( ) . toString ( ) ; out . write ( processor . apply ( contents ) ) ; } finally { closeQuietly ( out ) ; } }
This method is expected to be called only once during the code generation process after the
template processing is done.