boolean (final PsiClass targetClass, final PsiReferenceList referenceList, final Set<? super PsiJavaCodeReferenceElement> refs) { if (referenceList != null) { for (PsiJavaCodeReferenceElement referenceElement : referenceList.getReferenceElements()) { if (referenceElement.isReferenceTo(targetClass)) { refs.add(referenceElement); return true; } } } return false; }