@Override
    public JavaWriter beginClass(Type type, Type superClass, Type... interfaces) throws IOException {
        packages.add(type.getPackageName());
        beginLine(PUBLIC_CLASS, type.getGenericName(false, packages, classes));
        if (superClass != null) {
            append(EXTENDS).append(superClass.getGenericName(false, packages, classes));
        }
        if (interfaces.length > 0) {
            append(IMPLEMENTS);
            for (int i = 0; i < interfaces.length; i++) {
                if (i > 0) {
                    append(Symbols.COMMA);
                }
                append(interfaces[i].getGenericName(false, packages, classes));
            }
        }
        append(" {").nl().nl();
        goIn();
        types.push(type);
        return this;
    }
JavaWriter is the default implementation of the CodeWriter interface

@author tiwe
querydsl-codegen-utils/src/main/java/com/querydsl/codegen/utils/JavaWriter.java