@Override
    public ModelWriter writeField(JavaField field) {
        commentHeader(field);

        if (!field.isEnumConstant()) {
            buffer.write(field.getType().getGenericCanonicalName());
            buffer.write(' ');
        }
        buffer.write(field.getName());

        if (field.isEnumConstant()) {
            if (field.getEnumConstantArguments() != null
                    && !field.getEnumConstantArguments().isEmpty()) {
                buffer.write("( ");
                for (Iterator<Expression> iter = field.getEnumConstantArguments().listIterator(); iter
                        .hasNext();) {
                    buffer.write(iter.next().getParameterValue().toString());
                    if (iter.hasNext()) {
                        buffer.write(", ");
                    }
                }
                buffer.write(" )");
            }
            if (field.getEnumConstantClass() != null) {
                writeClassBody(field.getEnumConstantClass());
            }
            buffer.write(": ");
            buffer.write(Integer.toString(enumFieldCounter));
            buffer.write(",");
        }

        if (field.getInitializationExpression() != null
                && field.getInitializationExpression().length() > 0) {
            {
                buffer.write(" : ");
            }
            buffer.write(field.getInitializationExpression());
        }
        return this;
    }