private static PsiExpression @NotNull [] getVarargArgs(@NotNull PsiParameterList parameterList,
                                                         @NotNull PsiExpressionList expressionList) {
    final PsiParameter[] parameters = parameterList.getParameters();
    final PsiExpression[] expressions = expressionList.getExpressions();

    if (parameters.length == 0 || expressions.length == 0) {
      return PsiExpression.EMPTY_ARRAY;
    }

    final int varargIndex = parameters.length - 1;
    final PsiParameter varargParam = parameters[varargIndex];
    if (!varargParam.isVarArgs() || parameters.length > expressions.length) {
      return PsiExpression.EMPTY_ARRAY;
    }

    return Arrays.copyOfRange(expressions, varargIndex, expressions.length);
  }
private static PsiExpression @NotNull [] getVarargArgs(@NotNull PsiParameterList parameterList,
                                                         @NotNull PsiExpressionList expressionList)