PsiJavaCodeReferenceElement (@NotNull PsiJavaModule module) { PsiProvidesStatement statement = ContainerUtil.find(module.getProvides(), this::isTargetStatement); if (statement != null) { PsiReferenceList list = statement.getImplementationList(); if (list != null) { return ContainerUtil.find(list.getReferenceElements(), this::isTargetReference); } } return null; }