void (@NotNull Project project, @NotNull PsiMethodCallExpression call, @NotNull StringReplacement context) { PsiExpression replacementExpression = JavaPsiFacade.getElementFactory(project).createExpressionFromText(context.myReplacement, call); PsiElement result = call.replace(replacementExpression); LambdaCanBeMethodReferenceInspection.replaceAllLambdasWithMethodReferences(result); RemoveRedundantTypeArgumentsUtil.removeRedundantTypeArguments(result); }