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

        final Optional<String> value = gen.on(model.getValue());
        final Stream<String> valueStream = value.map(Stream::of).orElseGet(Stream::empty);

        return Optional.of(
                "@" + gen.on(model.getType()).orElseThrow(NoSuchElementException::new)
                + Stream.of(
                    model.getValues().stream()
                        .map(e -> e.getKey() + 
                            gen.on(e.getValue())
                                .map(s -> " = " + s)
                                .orElse("")
                        ),
                    valueStream
                ).flatMap(s -> s).collect(
                joinIfNotEmpty(", ", "(", ")")
        )
        );
    }
Transforms from an {@link AnnotationUsage} to java code.

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