code: public String formatStringAsJavadoc(String input) {
  
          if (input == null) {
              return null;
          }
  
          final StringBuilder finalComment = new StringBuilder("/**\n");
          Matcher regexMatcher = commentFormattingRegex.matcher(input);
          while (regexMatcher.find()) {
              finalComment.append("* ");
              finalComment.append(regexMatcher.group());
          }
          finalComment.append("\n*/\n");
  
          return finalComment.toString();
      }
docs: Formats a plain string (including newlines) and formats it as Javadoc.
  
  @param input Plain string (including newlines) to be formatted as Javadoc
  @return Formatted Javadoc