boolean (@NotNull PsiJavaCodeReferenceElement qualifier, UsageTarget @NotNull [] targets) { for (UsageTarget target : targets) { if (target instanceof PsiElementUsageTarget) { PsiElement element = ((PsiElementUsageTarget)target).getElement(); if (element instanceof PsiClass) { if (Objects.equals(qualifier.getReferenceName(), target.getName())) { return true; } } } } return false; }