public class Goto extends Statement
This AST element represents a "goto" statement. Goto statements are not legal Java constructs. However, they are often necessary to maintain semantic consistency -- at the cost of syntactic inaccuracies.
Unlike Break
s or Continue
s, the label of a goto statement is mandatory.
Label
Modifier and Type | Method and Description |
---|---|
static Goto |
build(Label label)
Create a goto statement.
|
Label |
getLabel()
Get the label.
|
void |
setLabel(Label label)
Set the label.
|
attachTag, getSubElements, isCompound, replaceSubElement, retrieveTag
public static Goto build(Label label)
Create a goto statement.
label
- mandatory labelpublic Label getLabel()
Get the label.
public void setLabel(Label label)
Set the label.
label
- mandatory label