add

fun add(format: String, vararg args: Any?): CodeBlock.Builder

Add code with positional or relative arguments.

Relative arguments map 1:1 with the placeholders in the format string.

Positional arguments use an index after the placeholder to identify which argument index to use. For example, for a literal to reference the 3rd argument: "%3L" (1 based index)

Mixing relative and positional arguments in a call to add is invalid and will result in an error.

fun add(codeBlock: CodeBlock): CodeBlock.Builder