private static void addJavaMethods(PsiElement[] psiElements, Collection<Object> variants, boolean withoutDot) {
final HashMap<MethodSignature, HashSet<PsiMethod>> sig2Methods = collectAvailableMethods(psiElements);
for (Map.Entry<MethodSignature, HashSet<PsiMethod>> entry : sig2Methods.entrySet()) {
final MethodSignature sig = entry.getKey();
final String name = sig.getName();
final StringBuffer buffer = new StringBuffer();
buffer.append(name).append("(");
buffer.append(StringUtil.join(ContainerUtil.map2Array(sig.getParameterTypes(), String.class, new Function<PsiType, String>() {
public String fun(PsiType psiType) {
return psiType.getPresentableText();
}
}), ", ")
).append(")");