void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { if (!(element instanceof PsiBinaryExpression || element instanceof PsiMethodCallExpression || element instanceof PsiConditionalExpression)) { return; } final PsiExpression expression = (PsiExpression)element; final String expressionText = "java.util.Objects.equals(" + myName1 + "," + myName2 + ")"; PsiReplacementUtil.replaceExpressionAndShorten(expression, myEquals ? expressionText : "!" + expressionText, new CommentTracker()); }