Class ImplJSwitch

    • Method Detail

      • add

        private <T extends CaseJBlock> T add​(T item)
      • _case

        public JBlock _case​(JExpr expr)
        Description copied from interface: JSwitch
        Add a switch case.
        Specified by:
        _case in interface JSwitch
        Parameters:
        expr - the case expression
        Returns:
        a sub-block for the case logic
      • _case

        public JBlock _case​(java.lang.String constName)
        Description copied from interface: JSwitch
        Add a switch case for an enum constant.
        Specified by:
        _case in interface JSwitch
        Parameters:
        constName - the constant name
        Returns:
        a sub-block for the case logic
      • _default

        public JBlock _default()
        Description copied from interface: JSwitch
        Add the default block.
        Specified by:
        _default in interface JSwitch
        Returns:
        the default sub-block
      • getExpression

        JExpr getExpression()
      • getCases

        java.util.ArrayList<CaseJBlock> getCases()
      • write

        public void write​(SourceFileWriter writer)
                   throws java.io.IOException
        Specified by:
        write in interface Writable
        Throws:
        java.io.IOException