@Override
	protected String onBeforeFields(Generator gen, Enum model) {
        requireNonNulls(gen, model);
        
        final List<String> constants = model.getConstants().stream()
			.map(c -> gen.on(c).get()).collect(toList());
        
        Formatting.alignTabs(constants);
        
		return constants.stream().collect(
				joinIfNotEmpty(
					(!model.getConstants().isEmpty()
					&& (!model.getConstants().get(0).getValues().isEmpty()
					||  !model.getConstants().get(0).getAnnotations().isEmpty()))
                        ? "," + Formatting.nl() : ", ",
					"", 
					";"
				)
			);
	}
Transforms from an {@link Enum} to java code.

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