String cleanCom(String com) { if (com == null) { return null; } com = Element.cleanComment(com).trim().replaceAll("\n", "<br>"); if (com.trim().length() == 0) { return null; } return com; }
String cleanCom(String com) { if (com == null) { return null; } com = Element.cleanComment(com).trim().replaceAll("\n", "<br>"); if (com.trim().length() == 0) { return null; } return com; }
public void addToCommentBefore(List<String> s) { String b = getCommentBefore(); List<String> ss = new ArrayList<String>(); if (b != null && (b = cleanComment(b)).length() > 0) ss.add(b); for (String a : s) if (a != null && (a = cleanComment(a)).length() > 0) ss.add(a); //s); //if (b != null && b.trim().length() > 0) // ss.add(0, b); setCommentBefore(ss.isEmpty() ? null : StringUtils.implode(ss, "\n")); } public void moveAllCommentsBefore() {
c = Element.cleanComment(c).trim(); nakedComments.add(c);
protected void collectParamComments(Function f) { for (Arg arg : f.getArgs()) { arg.moveAllCommentsBefore(); TypeRef argType = arg.getValueType(); if (argType != null) { if (!result.config.noComments) { argType.moveAllCommentsBefore(); arg.addToCommentBefore(argType.getCommentBefore()); } argType.stripDetails(); } if (arg.getCommentBefore() != null) { if (!result.config.noComments) { f.addToCommentBefore("@param " + arg.getName() + " " + Element.cleanComment(arg.getCommentBefore())); } arg.stripDetails(); } } }
protected void collectParamComments(Function f) { for (Arg arg : f.getArgs()) { arg.moveAllCommentsBefore(); TypeRef argType = arg.getValueType(); if (argType != null) { if (!result.config.noComments) { argType.moveAllCommentsBefore(); arg.addToCommentBefore(argType.getCommentBefore()); } argType.stripDetails(); } if (arg.getCommentBefore() != null) { if (!result.config.noComments) { f.addToCommentBefore("@param " + arg.getName() + " " + Element.cleanComment(arg.getCommentBefore())); } arg.stripDetails(); } } }