List<GrExpression> (@NotNull GrArgumentList argumentList) { final ArrayList<GrExpression> args = new ArrayList<>(); for (GroovyPsiElement arg : argumentList.getAllArguments()) { if (arg instanceof GrSpreadArgument) { GrExpression spreaded = ((GrSpreadArgument)arg).getArgument(); if (spreaded instanceof GrListOrMap && !((GrListOrMap)spreaded).isMap()) { Collections.addAll(args, ((GrListOrMap)spreaded).getInitializers()); } else { return null; } } else if (arg instanceof GrExpression) { args.add((GrExpression)arg); } else if (arg instanceof GrNamedArgument) { args.add(((GrNamedArgument)arg).getExpression()); } } final PsiElement parent = argumentList.getParent(); if (parent instanceof GrIndexProperty && PsiUtil.isLValue((GroovyPsiElement)parent)) { args.add(TypeInferenceHelper.getInitializerFor((GrExpression)parent)); } else if (parent instanceof GrMethodCallExpression) { ContainerUtil.addAll(args, ((GrMethodCallExpression)parent).getClosureArguments()); } return args; }