public class Switch
extends java.lang.Object
The tableswitch low-to-high range of values is represented by storing each lookup value in the range. This allows the tableswitch to be replaced with a lookupswitch if branches are deleted.
| Constructor and Description |
|---|
Switch(Label defaultTarget,
Label[] targets,
int[] values)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Label |
defaultTarget()
Get the default target of the switch.
|
boolean |
hasContiguousValues()
Check if the all the values in the range of lookup values are contiguous.
|
int |
highValue()
Get the high value in the range the lookup values.
|
int |
lowValue()
Get the low value in the range the lookup values.
|
void |
setDefaultTarget(Label target)
Set the default target of the switch.
|
Label[] |
targets()
Get the non-default branch targets of the switch.
|
java.lang.String |
toString()
Convert the operand to a string.
|
int[] |
values()
Get the lookup values of the switch, sorted low to high.
|
public void setDefaultTarget(Label target)
target - The default target of the switch.public Label defaultTarget()
public Label[] targets()
public int[] values()
public boolean hasContiguousValues()
public int lowValue()
public int highValue()
public java.lang.String toString()
toString in class java.lang.Object