Class FlowGraphEndPoints

    • Constructor Detail

      • FlowGraphEndPoints

        public FlowGraphEndPoints​(com.google.common.collect.ImmutableSet<NodeKey> normalEndPoints,
                                  com.google.common.collect.ImmutableSet<NodeKey> throwingEndPoints)
        Creates a new POJO with the given data.
        Parameters:
        normalEndPoints - The value returned by getNormalEndPoints()
        throwingEndPoints - The value returned by getThrowingEndPoints()
    • Method Detail

      • getNormalEndPoints

        public com.google.common.collect.ImmutableSet<NodeKey> getNormalEndPoints()
        Description copied from interface: IFlowGraphEndPoints
        Returns the set of all nodes (including the children, grand-children etc. of this node) that represent the normal end points when the node is executed. A normal end point is a node that can complete normally (i.e. will not always throw or return) and does not always transfer control to the node or a child of the node when it completes normally.

        More formally, given a syntax tree of nodes representing the parent-child relationship, a normal end point of a node n is the set of all nodes {m} such that all of the following hold:

        • (a) m is in the subtree of n,
        • (b) m can potentially complete normally (=does not always throw or return); and
        • (c) m does not always transfer control to a node in the subtree of n when m completes normally.

        The subtree of a node n is set of all nodes {m} that are either equal to n or have n as one of their parents.

        Specified by:
        getNormalEndPoints in interface IFlowGraphEndPoints
        Returns:
        All normal end points of the root node.
      • getThrowingEndPoints

        public com.google.common.collect.ImmutableSet<NodeKey> getThrowingEndPoints()
        Description copied from interface: IFlowGraphEndPoints
        Returns the set of all nodes (including the children, grand-children etc. of this node) that represent the throwing end points when the node is executed. A throwing end point is a node that can complete abruptly by throwing an exception and does not always transfer control to the node or a child of the node when it completes abruptly by throwing an exception.

        More formally, given a syntax tree of nodes representing the parent-child relationship, a throwing end point of a node n is the set of all nodes {m} such that all of the following hold:

        • (a) m is in the subtree of n,
        • (b) m can potentially complete abruptly by throwing an exception (=does not always complete normally or return); and
        • (c) m does not always transfer control to a node in the subtree of n when m completes abruptly by throwing an exception.

        The subtree of a node n is set of all nodes {m} that are either equal to n or have n as one of their parents.

        Specified by:
        getThrowingEndPoints in interface IFlowGraphEndPoints
        Returns:
        All throwing end points of the root node.
      • empty

        public static IFlowGraphEndPoints empty()
        Returns:
        An empty instance with no end points.