public final class SwitchBuilder extends Object
Switch statement.| Modifier and Type | Method and Description |
|---|---|
CodeChunk |
build()
Finishes building this switch statement.
|
SwitchBuilder |
case_(CodeChunk.WithValue caseLabel,
CodeChunk body)
Adds a case clause to this switch statement.
|
SwitchBuilder |
case_(com.google.common.collect.ImmutableList<CodeChunk.WithValue> caseLabels,
CodeChunk body)
Adds a case clause (one or more
case labels followed by a body) to this switch
statement. |
SwitchBuilder |
default_(CodeChunk body)
Adds a
default clause to this switch statement. |
public SwitchBuilder case_(com.google.common.collect.ImmutableList<CodeChunk.WithValue> caseLabels, CodeChunk body)
case labels followed by a body) to this switch
statement.public SwitchBuilder case_(CodeChunk.WithValue caseLabel, CodeChunk body)
public SwitchBuilder default_(CodeChunk body)
default clause to this switch statement.public CodeChunk build()