DfaCallArguments (@NotNull DfaMemoryState state, @NotNull PsiMethodReferenceExpression methodRef, DfaValue qualifier, @NotNull DataFlowInterpreter interpreter, @NotNull PsiMethod sam, @NotNull PsiMethod method, @NotNull PsiSubstitutor substitutor) { PsiParameter[] samParameters = sam.getParameterList().getParameters(); boolean firstParameterIsQualifier = isQualifierDereferenced(methodRef); PsiParameter[] parameters = method.getParameterList().getParameters(); DfaValue[] arguments = parameters.length == 0 ? DfaValue.EMPTY_ARRAY : new DfaValue[parameters.length]; Arrays.fill(arguments, interpreter.getFactory().getUnknown()); for (int i = 0; i < samParameters.length; i++) { DfaValue value = interpreter.getFactory().fromDfType( typedObject(substitutor.substitute(samParameters[i].getType()), DfaPsiUtil.getFunctionalParameterNullability(methodRef, i))); if (i == 0 && firstParameterIsQualifier) { qualifier = value; } else { int idx = i - (firstParameterIsQualifier ? 1 : 0); if (idx >= arguments.length) break; PsiType parameterType = parameters[idx].getType(); if (!(parameterType instanceof PsiEllipsisType)) { Nullability nullability = DfaPsiUtil.getElementNullability(substitutor.substitute(parameterType), parameters[idx]); arguments[idx] = adaptMethodRefArgument(interpreter, state, value, methodRef, parameters[idx], nullability); } } } return new DfaCallArguments(qualifier, arguments, MutationSignature.fromMethod(method)); }