PsiTypeCastExpressionPattern (final ElementPattern<? extends PsiExpression> operand) { return with(new PatternCondition<PsiTypeCastExpression>("withOperand") { @Override public boolean accepts(@NotNull PsiTypeCastExpression psiTypeCastExpression, ProcessingContext context) { return operand.accepts(psiTypeCastExpression.getOperand(), context); } }); }