String (@Nullable PsiMember member) { if (member instanceof PsiClass) { return ((PsiClass)member).getQualifiedName(); } if (member instanceof PsiField) { String containingClass = getSignature(member.getContainingClass()); return containingClass == null ? null : containingClass + "#" + member.getName(); } if (member instanceof PsiMethod method) { String containingClass = getSignature(member.getContainingClass()); if (containingClass == null) return null; StringBuilder buf = new StringBuilder(); buf.append(containingClass); buf.append('#'); buf.append(method.getName()); buf.append('('); for (PsiType type : method.getSignature(PsiSubstitutor.EMPTY).getParameterTypes()) { buf.append(type.getCanonicalText()); buf.append(";"); } buf.append(')'); return buf.toString(); } return null; }