void (@Nullable GrExpression qualifier, @NotNull PsiMethod method, GrExpression @NotNull [] exprs, GrNamedArgument @NotNull [] namedArgs, GrClosableBlock @NotNull [] closures, @NotNull PsiSubstitutor substitutor, @NotNull GrAssignmentExpression assignment) { if (PsiUtil.isExpressionUsed(assignment)) { final GrExpression rValue = assignment.getRValue(); //inline setter method invocation in case of tail statement and simple right value if (PsiUtil.isExpressionStatement(assignment) && PsiUtil.isReturnStatement(assignment) && rValue != null && isVarAccess(rValue)) { final StringBuilder assignmentBuffer = new StringBuilder(); new ExpressionGenerator(assignmentBuffer, context).invokeMethodOn(method, qualifier, exprs, namedArgs, closures, substitutor, assignment); assignmentBuffer.append(';'); context.myStatements.add(assignmentBuffer.toString()); rValue.accept(this); } else { String setterName = context.getSetterName(method, assignment); GrExpression[] args; if (method.hasModifierProperty(PsiModifier.STATIC)) { args = exprs; } else { args = new GrExpression[exprs.length + 1]; if (qualifier == null) { qualifier = factory.createExpressionFromText("this", assignment); } args[0] = qualifier; System.arraycopy(exprs, 0, args, 1, exprs.length); } GenerationUtil.invokeMethodByName(null, setterName, args, namedArgs, closures, this, assignment); } } else { invokeMethodOn(method, qualifier, exprs, namedArgs, closures, substitutor, assignment); } }