void (@NotNull GrClosableBlock closure) { builder.append("new "); TypeWriter.writeTypeForNew(builder, closure.getType(), closure); builder.append('('); final CharSequence owner = getOwner(closure); builder.append(owner); builder.append(", "); builder.append(owner); builder.append(") {\n"); generateClosureMainMethod(closure); final ClassItemGeneratorImpl generator = new ClassItemGeneratorImpl(context); final GrMethod method = generateClosureMethod(closure); final GrReflectedMethod[] reflectedMethods = method.getReflectedMethods(); for (GrReflectedMethod reflectedMethod : reflectedMethods) { if (reflectedMethod.getSkippedParameters().length > 0) { generator.writeMethod(builder, reflectedMethod); builder.append('\n'); } } builder.append('}'); }