boolean (@NotNull PsiElement element, @NotNull ResolveState state) { if (childrenClass.isInstance(element) && elementTypes.contains(((StubBasedPsiElement<?>)element).getElementType())) { result.add(childrenClass.cast(element)); } return true; }