void (@NotNull PsiJavaCodeReferenceElement referenceElement) { referenceElement = findTopmostReference(referenceElement); PsiElement parent = referenceElement.getParent(); if (parent != null && referenceElement.isQualified()) { PsiProvidesStatement providesStatement = ObjectUtils.tryCast(parent.getParent(), PsiProvidesStatement.class); if (providesStatement != null && providesStatement.getImplementationList() == parent) { myImplementationClassName = referenceElement.getQualifiedName(); if (myImplementationClassName != null) { PsiJavaCodeReferenceElement interfaceReference = providesStatement.getInterfaceReference(); if (interfaceReference != null) { PsiClass superClass = ObjectUtils.tryCast(interfaceReference.resolve(), PsiClass.class); if (superClass != null) { myInterface = superClass.isInterface(); mySuperClassName = superClass.getQualifiedName(); if (mySuperClassName != null) { myModuleName = Optional.of(referenceElement) .map(PsiElement::getContainingFile) .map(ModuleUtilCore::findModuleForFile) .map(Module::getName) .orElse(null); } } } } } } }