PsiMethod[] (GrTypeDefinition grType, String name, boolean checkBases, boolean includeSyntheticAccessors) { if (!checkBases) { List<PsiMethod> result = new ArrayList<>(); for (PsiMethod method : CollectClassMembersUtil.getMethods(grType, includeSyntheticAccessors)) { if (name.equals(method.getName())) result.add(method); } return result.toArray(PsiMethod.EMPTY_ARRAY); } Map<String, List<CandidateInfo>> methodsMap = CollectClassMembersUtil.getAllMethods(grType, includeSyntheticAccessors); return PsiImplUtil.mapToMethods(methodsMap.get(name)); }