boolean (@NotNull PsiElement context, @NotNull PsiType targetType) { TypeParameterSearcher searcher = new TypeParameterSearcher(); targetType.accept(searcher); Set<PsiTypeParameter> parameters = searcher.getTypeParameters(); return ContainerUtil.and(parameters, parameter -> isAccessibleAt(parameter, context)); }