private String parseMembers(ExecutableMemberDoc[] mems) {
StringBuffer buf = new StringBuffer();
for (ExecutableMemberDoc m : mems) {
ParamTag[] params = m.paramTags();
if (m instanceof MethodDoc) {
MethodDoc md = (MethodDoc) m;
buf.append("{anchor:").append(md.name())
.append(md.flatSignature()).append("}\n");
}
buf.append("h3. " + m.qualifiedName());
buf.append('(');
for (int i = 0, nump = m.parameters().length; i < nump; i++) {
Parameter p = m.parameters()[i];
buf.append(buildTypeLink(p.type())).append(" ")
.append(p.name());
if (i < nump - 1) {
buf.append(", ");
}
}
buf.append(")\n\n");
String comment = parseComment(m.inlineTags());
if (comment.length() > 0) {
buf.append(comment).append("\n\n");
}
for (ParamTag p : params) {
buf.append(
"* *" + p.parameterName() + "*: "
+ p.parameterComment()).append("\n");
}
if (m instanceof MethodDoc) {
MethodDoc md = (MethodDoc) m;
buf.append("\n*Returns:* ")
.append(md.returnType().qualifiedTypeName())
.append("\n");
}
buf.append("\n");
}
return buf.toString();