PsiElement (@Nullable final PsiElement parent, @NotNull final String referencedName, @Nullable final PsiFile containingFile, boolean fileOnly, boolean checkForPackage, boolean withoutStubs) { final List<RatedResolveResult> results = resolveChildren(parent, referencedName, containingFile, fileOnly, checkForPackage, withoutStubs, false); return results.isEmpty() ? null : RatedResolveResult.sorted(results).get(0).getElement(); }