private static String getCommentText(FieldItem fieldItem) { StringBuilder sb = new StringBuilder(); sb.append(" //"); String comment = fieldItem.getComment(); if (StringHelper.isNotEmpty(comment)) { comment = comment.replaceAll("[\\r|\\n]", " "); sb.append(comment); } String since = fieldItem.getSince(); if (StringHelper.isNotEmpty(since)) { sb.append(" @since "); sb.append(since); } String deprecated = fieldItem.getDeprecated(); if (StringHelper.isNotEmpty(deprecated)) { sb.append(" @deprecated "); sb.append(deprecated); } sb.append(" @type "); sb.append(fieldItem.getFormatedTypeName()); return sb.toString(); }