gnu.bytecode
public class SwitchState extends Object
Constructor Summary | |
---|---|
SwitchState(CodeAttr code) |
Method Summary | |
---|---|
boolean | addCase(int value, CodeAttr code) Emit a new case, for the given value, whose label is here. |
boolean | addCase(int value, Label label, CodeAttr code) Add a new case. |
void | addDefault(CodeAttr code) |
void | addDefault(Label label, CodeAttr code) |
void | finish(CodeAttr code) Handle the end of the switch statement.
|
int | getMaxValue() |
Parameters: value the case value to match against at run-time label the location to go to if the value matches code the CodeAttr of the Method we are generating code for
Returns: true on success; false if value duplicates an existing value