beginControlFlow

fun beginControlFlow(controlFlow: String, vararg args: Any?): CodeBlock.Builder

Parameters

controlFlow

the control flow construct and its code, such as if (foo == 5). Shouldn't contain newline characters. Can contain opening braces, e.g. beginControlFlow("list.forEach { element ->"). If there's no opening brace at the end of the string, it will be added.