Class AbstractSwitchStmt

    • Field Detail

      • keyBox

        protected final ValueBox keyBox
      • defaultTargetBox

        protected final UnitBox defaultTargetBox
      • targetBoxes

        protected final List<UnitBox> targetBoxes
    • Constructor Detail

      • AbstractSwitchStmt

        protected AbstractSwitchStmt​(ValueBox keyBox,
                                     UnitBox defaultTargetBox,
                                     UnitBox... targetBoxes)
    • Method Detail

      • getUseBoxes

        public final List<ValueBox> getUseBoxes()
        Description copied from class: AbstractUnit
        Returns a list of Boxes containing Values used in this Unit. The list of boxes is dynamically updated as the structure changes. Note that they are returned in usual evaluation order. (this is important for aggregation)
        Specified by:
        getUseBoxes in interface Unit
        Overrides:
        getUseBoxes in class AbstractUnit
      • getTargetCount

        public final int getTargetCount()
      • setTarget

        public final void setTarget​(int index,
                                    Unit target)
        Specified by:
        setTarget in interface SwitchStmt
      • setTargets

        public final void setTargets​(List<? extends Unit> targets)
      • setTargets

        public final void setTargets​(Unit[] targets)
      • getUnitBoxes

        public final List<UnitBox> getUnitBoxes()
        Description copied from class: AbstractUnit
        Returns a list of Boxes containing Units defined in this Unit; typically branch targets. The list of boxes is dynamically updated as the structure changes.
        Specified by:
        getUnitBoxes in interface Unit
        Overrides:
        getUnitBoxes in class AbstractUnit
      • fallsThrough

        public final boolean fallsThrough()
        Description copied from interface: Unit
        Returns true if execution after this statement may continue at the following statement. GotoStmt will return false but IfStmt will return true.
        Specified by:
        fallsThrough in interface Unit
      • branches

        public final boolean branches()
        Description copied from interface: Unit
        Returns true if execution after this statement does not necessarily continue at the following statement. GotoStmt and IfStmt will both return true.
        Specified by:
        branches in interface Unit