@Override
	public Optional<String> transform(Generator gen, EnumConstant model) {
        requireNonNulls(gen, model);
        
        final String inner;

        if (model.getFields().isEmpty()
                && model.getInitializers().isEmpty()
                && model.getClasses().isEmpty()
                && model.getMethods().isEmpty()
        ) {
            inner = "";
        } else {
            inner = " " + block(separate(
                    renderFields(gen, model),
                    renderInitalizers(gen, model),
                    renderClasses(gen, model),
                    renderMethods(gen, model)
                    ));
        }

		return Optional.of(
            renderJavadoc(gen, model) +
            renderAnnotations(gen, model) +
			model.getName() + 
			(model.getValues().isEmpty() ? "" : " ") +
			gen.onEach(model.getValues()).collect(
				joinIfNotEmpty(", ", "\t(", ")")
			) + inner
		);
	}
Transforms from an {@link EnumConstant} to java code.

@author Emil Forslund
common-parent/codegen/src/main/java/com/speedment/common/codegen/internal/java/view/EnumConstantView.java