Object[] (@NotNull ReflectiveClass ownerClass, Predicate<? super PsiMethod> filter) { return ownerClass.getPsiClass().getVisibleSignatures() .stream() .map(MethodSignatureBackedByPsiMethod::getMethod) .filter(filter) .sorted(Comparator.comparingInt((PsiMethod method) -> getMethodSortOrder(method)).thenComparing(PsiMethod::getName)) .map(method -> withPriority(lookupMethod(method, this), -getMethodSortOrder(method))) .filter(Objects::nonNull) .toArray(); }