Stream<PsiNamedElement> (@NotNull PsiType targetType) { return myContextElements.stream().filter(e -> { PsiType elementType = getType(e); return elementType != null && targetType.isAssignableFrom(elementType); }); }