TypeConversionDescriptorBase (PsiType from, PsiType to, @NotNull PsiMethod method, @NotNull String methodName, PsiExpression context, TypeMigrationLabeler labeler) { if (!(context instanceof PsiMethodCallExpression)) { return null; } if (isPredicates((PsiMethodCallExpression)context)) { final TypeConversionDescriptorBase descriptor = GuavaPredicatesUtil.tryConvertIfPredicates(method, context); if (descriptor != null) { return descriptor; } } return new TypeConversionDescriptorBase() { @Override public PsiExpression replace(PsiExpression expression, @NotNull TypeEvaluator evaluator) { final PsiExpression methodReference = JavaPsiFacade.getElementFactory(expression.getProject()).createExpressionFromText(expression.getText() + "::test", expression); return (PsiExpression)expression.replace(methodReference); } }; }