String (Object member) { if (member instanceof PsiClass) { return "class:" + ((PsiClass) member).getName(); } if (member instanceof PsiMethod) { return "method:" + ((PsiMethod) member).getName(); } if (member instanceof PsiField) { return "field:" + ((PsiField) member).getName(); } if (member instanceof PsiParameter) { return "param:" + ((PsiParameter) member).getName(); } throw new IllegalStateException("Do not know how to render member of type: " + member.getClass().getName()); }