void (PsiMethodCallExpression callExpression, PsiExpression qualifierExpression) { final PsiExpression cast = AnonymousCanBeLambdaInspection.replacePsiElementWithLambda(qualifierExpression, true, false); if (cast instanceof PsiTypeCastExpression) { final PsiExpression lambdaExpression = ((PsiTypeCastExpression)cast).getOperand(); if (lambdaExpression instanceof PsiLambdaExpression) { replaceWithLambdaBody((PsiLambdaExpression)lambdaExpression); } } }