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

        return Optional.of(
            renderAnnotations(gen, model)
            + renderAnnotations(gen, model)
            + "@interface "
            + renderName(gen, model)
            + block(
                model.getFields().stream().map(f
                    -> // Field javadoc (optional)
                    renderJavadoc(gen, model)
                    + // Field declaration
                    gen.on(f.getType()) + " " + f.getName() + "()"
                    + // Default value (optional)
                    ifelse(gen.on(f.getValue()), v -> " default " + v, "")
                    + ";"
                ).collect(joining(dnl()))
            )
        );
    }
Transforms from an {@link Annotation} to java code.

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