boolean (@NotNull PsiElement element, @NotNull ResolveState state) { if (element instanceof PsiModifierListOwner && ((PsiModifierListOwner)element).hasModifierProperty(PsiModifier.STATIC)) { PsiScopeProcessor delegate = getDelegate(); if (element instanceof PsiNamedElement) { String name = ((PsiNamedElement)element).getName(); Iterable<ResultWithContext> shadowing = myExplicitlyEnumerated.get(name); if (shadowing != null && ContainerUtil.exists(shadowing, rwc -> hasSameDeclarationKind(element, rwc.getElement()))) return true; if (delegate instanceof MethodsProcessor && element instanceof PsiMethod) { PsiClass containingClass = ((PsiMethod)element).getContainingClass(); if (containingClass != null && containingClass.isInterface()) { PsiElement currentFileContext = ((MethodsProcessor)delegate).getCurrentFileContext(); if (currentFileContext instanceof PsiImportStaticStatement && ((PsiImportStaticStatement)currentFileContext).isOnDemand() && !containingClass.isEquivalentTo(((PsiImportStaticStatement)currentFileContext).resolveTargetClass())) { return true; } } } } if (myCollectedElements.add(element)) { return delegate.execute(element, state); } } return true; }