List<PsiTypeCastExpression> (PsiElement expression, PsiInstanceOfExpression targetInstanceOf) { return SyntaxTraverser.psiTraverser(expression) .filter(PsiTypeCastExpression.class) .filter(cast -> InstanceOfUtils.findPatternCandidate(cast) == targetInstanceOf) .toList(); }