boolean (@NotNull PsiReference reference, @NotNull PsiClass methodClass, @NotNull PsiManager manager, @NotNull PsiClass aClass, @NotNull FindUsagesOptions options, @NotNull Processor<? super UsageInfo> processor) { PsiElement refElement = reference.getElement(); if (refElement instanceof PsiReferenceExpression referenceExpression) { PsiClass usedClass = getFieldOrMethodAccessedClass(referenceExpression, methodClass); if (usedClass != null) { if (manager.areElementsEquivalent(usedClass, aClass) || usedClass.isInheritor(aClass, true)) { return addResult(refElement, options, processor); } } } return true; }