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

        final int blockWidth = BLOCK_WIDTH - 3 - currentTabLevel(gen);
        final String formattedText = formatText(model.getText(), 0, blockWidth).toString();
        
        final Map<String, List<JavadocTag>> tagGroups = model.getTags().stream()
            .collect(Collectors.groupingBy(
                JavadocView::groupOf, 
                TreeMap::new, 
                Collectors.toList()
            ));
        
        final String tagSection = tagGroups.values().stream().map(tags -> {
            final List<StringBuilder> rowBuilders = new ArrayList<>(tags.size());

            // Create a new row builder for each tag and initiate it with the 
            // tag name
            tags.forEach(tag -> {
                final StringBuilder row = new StringBuilder("@").append(tag.getName());
                
                if (tag.getText().isPresent()) {
                    row.append(tag.getValue().map(v -> " " + v).orElse(""));
                }
                
                rowBuilders.add(row);
            });
            
            // Determine the column width of the widest tag name and use that 
            // for padding.
            final int indentTo = rowBuilders.stream()
                .mapToInt(StringBuilder::length)
                .map(i -> i + 1)             // Add one extra space to each row.
                .max().orElse(0);            // If empty, do no padding.
            
            rowBuilders.forEach(row -> {
                final int padding = indentTo - row.length();
                if (padding > 0) {
                    row.append(repeat(" ", padding));
                }
            });
            
            // All the rows are now of the same width. Go through the remaining 
            // content and add it to the text, padding in each new line with the 
            // same amount.
            for (int i = 0; i < rowBuilders.size(); i++) {
                final JavadocTag tag    = tags.get(i);
                final StringBuilder row = rowBuilders.get(i);
                
                final String content;
                if (tag.getText().isPresent()) {
                    content = tag.getText().orElse("");
                } else {
                    content = Stream.of(
                        tag.getValue().orElse(null),
                        tag.getText().orElse(null)
                    ).filter(Objects::nonNull).collect(joining(" "));
                }
                
                row.append(formatText(content, indentTo, blockWidth));
            }
            
            // Concatenate the rows, separating them with new-line characters.
            return rowBuilders.stream()
                .map(StringBuilder::toString)
                .collect(joining(nl()));
        }).collect(joining(dnl()));
        
		return Optional.of(
            JAVADOC_PREFIX + 
            Stream.of(formattedText, tagSection)
                .filter(Objects::nonNull)
                .filter(s -> !s.isEmpty())
                .collect(joining(dnl()))
                .replace(nl(), JAVADOC_DELIMITER) + 
            JAVADOC_SUFFIX
        );
	}
" + nl() + " * ";
    private static final String JAVADOC_SUFFIX    = nl() + "
common-parent/codegen/src/main/java/com/speedment/common/codegen/internal/java/view/JavadocView.java