Builder

class Builder

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

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

Add code with positional or relative arguments.

Link copied to clipboard
fun addNamed(format: String, arguments: Map<String, *>): CodeBlock.Builder

Adds code using named arguments.

Link copied to clipboard
fun addStatement(format: String, vararg args: Any?): CodeBlock.Builder
Link copied to clipboard
fun beginControlFlow(controlFlow: String, vararg args: Any?): CodeBlock.Builder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun nextControlFlow(controlFlow: String, vararg args: Any?): CodeBlock.Builder
Link copied to clipboard
Link copied to clipboard

Calls CodeBlock.Builder.indent then executes the provided builderAction on the CodeBlock.Builder and then executes CodeBlock.Builder.unindent before returning the original CodeBlock.Builder.