public void println(MethodInfo method, String indentation) { append(asAnnotations(method.getAnnotationNames(), indentation)); append(indentation); if (method.getModifiersStr() != null) { append(method.getModifiersStr()).append(' '); } if (!method.isConstructor()) { append(removeQualifierFromBaseTypes(method.getResultTypeStr())).append(' '); } append(method.getMethodName()).append('('); LinkedList<String> paramTypes = method .getTypeSignature() .getParameterTypeSignatures() .stream() .map(ApiPrintWriter::removeQualifierFromBaseTypes) .collect(toCollection(LinkedList::new)); //if parameter is varargs, remove the array [] qualifier and replace with ellipsis if (method.isVarArgs() && !paramTypes.isEmpty()) { String vararg = paramTypes.removeLast(); paramTypes.add(vararg.substring(0, vararg.length() - 2) + "..."); } append(paramTypes.stream().collect(joining(", "))); println(')'); }
buf.append(' '); buf.append(mi.getModifiersStr());