+ /**
+ * Returns formatted type description.
+ *
+ * @param type given type
+ * @return formatted type description
+ */
+ public static String formatDataForJavaDoc(final GeneratedType type) {
+ final StringBuilder javaDoc = new StringBuilder();
+ final TypeComment comment = type.getComment();
+ if (comment != null) {
+ javaDoc.append(comment.getJavadoc())
+ .append(NEW_LINE)
+ .append(NEW_LINE)
+ .append(NEW_LINE);
+ }
+
+ appendSnippet(javaDoc, type);
+
+ return javaDoc.toString();
+ }
+
+ private static String formatDataForJavaDoc(final TypeMember type, final String additionalComment) {
+ final StringBuilder javaDoc = new StringBuilder();
+ if (type.getComment() != null && !type.getComment().isEmpty()) {
+ javaDoc.append(formatToParagraph(type.getComment(), 0))
+ .append(NEW_LINE)
+ .append(NEW_LINE)
+ .append(NEW_LINE);
+ }
+ javaDoc.append(additionalComment);
+ return wrapToDocumentation(javaDoc.toString());
+ }
+