Class ExceptionBlockImpl

    • Field Detail

      • exceptionalSuccessors

        protected final java.util.Map<javax.lang.model.type.TypeMirror,​java.util.Set<Block>> exceptionalSuccessors
        Set of exceptional successors.
    • Constructor Detail

      • ExceptionBlockImpl

        public ExceptionBlockImpl()
        Create an empty exceptional block.
    • Method Detail

      • setNode

        public void setNode​(Node c)
        Set the node.
      • getNode

        public Node getNode()
        Description copied from interface: ExceptionBlock
        Returns the node of this block.
        Specified by:
        getNode in interface ExceptionBlock
        Returns:
        the node of this block
      • getNodes

        public java.util.List<Node> getNodes()
        Returns the nodes contained within this basic block. The list may be empty.

        The following invariant holds.

         forall n in getNodes() :: n.getBlock() == this
         

        This implementation returns a singleton list.

        Specified by:
        getNodes in interface Block
        Returns:
        the nodes contained within this basic block
      • getLastNode

        public @Nullable Node getLastNode()
        Description copied from interface: Block
        Returns the last node of this block, or null if none.
        Specified by:
        getLastNode in interface Block
        Returns:
        the last node of this block or null
      • addExceptionalSuccessor

        public void addExceptionalSuccessor​(BlockImpl b,
                                            javax.lang.model.type.TypeMirror cause)
        Add an exceptional successor.
        Parameters:
        b - the successor
        cause - the exception type that leads to the given block
      • getExceptionalSuccessors

        public java.util.Map<javax.lang.model.type.TypeMirror,​java.util.Set<Block>> getExceptionalSuccessors()
        Description copied from interface: ExceptionBlock
        Returns the list of exceptional successor blocks as an unmodifiable map.
        Specified by:
        getExceptionalSuccessors in interface ExceptionBlock
        Returns:
        the list of exceptional successor blocks as an unmodifiable map
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object