public class TableSwitchBuilder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TableSwitchBuilder.ValuePair |
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.atomic.AtomicReference<BranchEnd> |
defaultBranchEnd |
private CodeLocation |
defaultLocation |
private int |
high |
private int |
low |
private java.util.List<TableSwitchBuilder.ValuePair> |
values |
Constructor and Description |
---|
TableSwitchBuilder(CodeLocation defaultLocation,
int low,
int high)
Builds a lookup switch statement, specifying the default location
|
TableSwitchBuilder(int low,
int high)
Builds a lookup switch statement with no specified default location.
|
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.atomic.AtomicReference<BranchEnd> |
add()
Adds a value to the table that is at a location yet to be written.
|
TableSwitchBuilder |
add(CodeLocation location)
Adds a value to the table
|
java.util.concurrent.atomic.AtomicReference<BranchEnd> |
getDefaultBranchEnd() |
CodeLocation |
getDefaultLocation() |
int |
getHigh() |
int |
getLow() |
java.util.List<TableSwitchBuilder.ValuePair> |
getValues() |
private final CodeLocation defaultLocation
private final java.util.concurrent.atomic.AtomicReference<BranchEnd> defaultBranchEnd
private final java.util.List<TableSwitchBuilder.ValuePair> values
private final int low
private final int high
public TableSwitchBuilder(int low, int high)
BranchEnd
will be returned that can be used to
set the location.low
- high
- public TableSwitchBuilder(CodeLocation defaultLocation, int low, int high)
defaultLocation
- The default locationlow
- high
- public java.util.concurrent.atomic.AtomicReference<BranchEnd> add()
public TableSwitchBuilder add(CodeLocation location)
public CodeLocation getDefaultLocation()
public java.util.concurrent.atomic.AtomicReference<BranchEnd> getDefaultBranchEnd()
public java.util.List<TableSwitchBuilder.ValuePair> getValues()
public int getLow()
public int getHigh()