TypeConversionDescriptorBase (PsiMethod method, PsiExpression context) { final String name = method.getName(); switch (name) { case "alwaysTrue", "alwaysFalse" -> { return createConstantPredicate(name, name.contains("True")); } case "isNull", "notNull" -> { final String operation = name.equals("isNull") ? "==" : "!="; return new TypeConversionDescriptorWithLocalVariable(name, "$x$ -> $x$" + operation + " null"); } case "equalTo" -> { return new TypeConversionDescriptorWithLocalVariable("equalTo", "$x$ -> java.util.Objects.equals($x$, $v$)"); } } if (!isConvertablePredicatesMethod(method, (PsiMethodCallExpression)context)) return null; if (((PsiMethodCallExpression)context).getArgumentList().isEmpty()) { return createConstantPredicate(name, name.equals("and")); } if (PREDICATES_AND_OR.contains(name) && canMigrateAndOrOr((PsiMethodCallExpression)context)) { return new AndOrOrConversionDescriptor(GuavaConversionUtil.addTypeParameters(GuavaLambda.PREDICATE.getJavaAnalogueClassQName(), context.getType(), context)); } else if (PREDICATES_NOT.equals(name)) { return new NotConversionDescriptor(GuavaConversionUtil.addTypeParameters(GuavaLambda.PREDICATE.getJavaAnalogueClassQName(), context.getType(), context)); } return null; }