Package jminusminus
Class SwitchStatementGroup
java.lang.Object
jminusminus.SwitchStatementGroup
A switch-statement group consists of a list of switch labels and a block of statements.
-
Constructor Summary
ConstructorsConstructorDescriptionSwitchStatementGroup
(ArrayList<JExpression> switchLabels, ArrayList<JStatement> block) Constructs a switch-statement group. -
Method Summary
Modifier and TypeMethodDescriptionblock()
Returns the block of statements associated with this switch-statement group.Returns the switch labels associated with this switch-statement group.void
toJSON
(JSONElement json) Stores information about this switch statement group in JSON format.
-
Constructor Details
-
SwitchStatementGroup
Constructs a switch-statement group.- Parameters:
switchLabels
- switch labels.block
- block of statements.
-
-
Method Details
-
getSwitchLabels
Returns the switch labels associated with this switch-statement group.- Returns:
- the switch labels associated with this switch-statement group.
-
block
Returns the block of statements associated with this switch-statement group.- Returns:
- the block of statements associated with this switch-statement group.
-
toJSON
Stores information about this switch statement group in JSON format.- Parameters:
json
- the JSON emitter.
-