Class JCase

  • All Implemented Interfaces:
    JStatement

    public final class JCase
    extends java.lang.Object
    implements JStatement
    Case statement
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private JBlock body
      JBlock of statements which makes up body of this While statement
      private boolean isDefaultCase
      is this a regular case statement or a default case statement?
      private JExpression label
      label part of the case statement
    • Constructor Summary

      Constructors 
      Constructor Description
      JCase​(JExpression label)
      Construct a case statement
      JCase​(JExpression label, boolean isDefaultCase)
      Construct a case statement.
    • Field Detail

      • label

        private JExpression label
        label part of the case statement
      • body

        private JBlock body
        JBlock of statements which makes up body of this While statement
      • isDefaultCase

        private boolean isDefaultCase
        is this a regular case statement or a default case statement?
    • Constructor Detail

      • JCase

        JCase​(JExpression label)
        Construct a case statement
      • JCase

        JCase​(JExpression label,
              boolean isDefaultCase)
        Construct a case statement. If isDefaultCase is true, then label should be null since default cases don't have a label.