Package jminusminus

Class SwitchStatementGroup

java.lang.Object
jminusminus.SwitchStatementGroup

class SwitchStatementGroup extends Object
A switch-statement group consists of a list of switch labels and a block of statements.
  • Constructor Details

    • SwitchStatementGroup

      public SwitchStatementGroup(ArrayList<JExpression> switchLabels, ArrayList<JStatement> block)
      Constructs a switch-statement group.
      Parameters:
      switchLabels - switch labels.
      block - block of statements.
  • Method Details

    • getSwitchLabels

      public ArrayList<JExpression> getSwitchLabels()
      Returns the switch labels associated with this switch-statement group.
      Returns:
      the switch labels associated with this switch-statement group.
    • block

      public ArrayList<JStatement> block()
      Returns the block of statements associated with this switch-statement group.
      Returns:
      the block of statements associated with this switch-statement group.
    • toJSON

      public void toJSON(JSONElement json)
      Stores information about this switch statement group in JSON format.
      Parameters:
      json - the JSON emitter.