public class LookupSwitchBuilder extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LookupSwitchBuilder.ValuePair |
Constructor and Description |
---|
LookupSwitchBuilder()
Builds a lookup switch statement with no specified default location.
|
LookupSwitchBuilder(CodeLocation defaultLocation)
Builds a lookup switch statement, specifying the default location
|
Modifier and Type | Method and Description |
---|---|
AtomicReference<BranchEnd> |
add(int value)
Adds a value to the table that is at a location yet to be written.
|
LookupSwitchBuilder |
add(int value,
CodeLocation location)
Adds a value to the table
|
AtomicReference<BranchEnd> |
getDefaultBranchEnd() |
CodeLocation |
getDefaultLocation() |
List<LookupSwitchBuilder.ValuePair> |
getValues() |
public LookupSwitchBuilder()
BranchEnd
will be returned that can be used to
set the location.public LookupSwitchBuilder(CodeLocation defaultLocation)
defaultLocation
- The default locationpublic AtomicReference<BranchEnd> add(int value)
value
- The value to add to the lookup tablepublic LookupSwitchBuilder add(int value, CodeLocation location)
value
- The value to add to the lookup tablepublic CodeLocation getDefaultLocation()
public AtomicReference<BranchEnd> getDefaultBranchEnd()
public List<LookupSwitchBuilder.ValuePair> getValues()
Copyright © 2021 JBoss by Red Hat. All rights reserved.