String[] (PsiMethod[] psiMethods) { String[] classes = new String[psiMethods.length]; for (int i = 0; i < psiMethods.length; i++) { PsiMethod psiMethod = psiMethods[i]; classes[i] = psiMethod.getContainingClass().toString() + ": " + psiMethod.getContainingClass().getName() + "; " + psiMethod.getHierarchicalMethodSignature().toString(); } Arrays.sort(classes); return classes; }