String (@NotNull String chronoEnumName, @NotNull PsiMethodCallExpression call) { PsiMethod method = call.resolveMethod(); if (method == null) { return null; } if (!isAvailableCall(method, chronoEnumName)) { return null; } //'with(ChronoField, long)' can be converted only to 'with...(int)' if ("with".equals(method.getName())) { PsiType[] types = call.getArgumentList().getExpressionTypes(); if (types.length != 2 || types[1] == null || TypeConversionUtil.getTypeRank(types[1]) > TypeConversionUtil.INT_RANK) { return null; } } String methodName = method.getName(); return findEquivalentMethod(chronoEnumName, methodName); }