boolean (@NotNull ResolveState state, @NotNull PsiElement place, @NotNull PsiPackage aPackage, @NotNull PsiScopeProcessor processor) { if (!aPackage.getQualifiedName().isEmpty()) { processor = new DelegatingScopeProcessor(processor) { @Nullable @Override public <T> T getHint(@NotNull Key<T> hintKey) { if (hintKey == ElementClassHint.KEY) { //noinspection unchecked return (T)(ElementClassHint)kind -> kind == ElementClassHint.DeclarationKind.CLASS; } return super.getHint(hintKey); } }; } return aPackage.processDeclarations(processor, state, null, place); }