code: public static String stringToJavadoc(String doc, Object deprecatedProp) {
      boolean emptyDoc = (doc == null || doc.trim().isEmpty());
      boolean emptyDeprecated = (deprecatedProp == null || !(deprecatedProp instanceof String));
  
      if (emptyDoc && emptyDeprecated) return "";
  
      String javadocBody = emptyDoc ? "" : (doc + "\n");
      String deprecated = (emptyDeprecated) ? "" : ("@deprecated " + deprecatedProp + "\n");
  
      String text = javadocBody + deprecated;
      return DocEscaping.stringToDocComment(text, DocCommentStyle.ASTRISK_MARGIN);
    }
docs: Returns a javadoc comment, as a string of java source, for the given documentation string
  and deprecated property.
  
  @param doc provides the javadoc for the symbol, if any.  May be null.
  @param deprecatedProp provides the deprecated Pegasus schema property, if any.  May be a
  Boolean, a String, or null.
  @return an escaped javadoc string.