Class Edge

    • Constructor Detail

      • Edge

        protected Edge​(Statement source,
                       Statement destination)
        Builds the edge.
        Parameters:
        source - the source statement
        destination - the destination statement
    • Method Detail

      • getSource

        public final Statement getSource()
        Description copied from interface: Edge
        Yields the node where this edge originates.
        Specified by:
        getSource in interface Edge<Statement,​Edge,​CFG>
        Returns:
        the source node
      • getDestination

        public final Statement getDestination()
        Description copied from interface: Edge
        Yields the node where this edge ends.
        Specified by:
        getDestination in interface Edge<Statement,​Edge,​CFG>
        Returns:
        the destination node
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

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

        public <V> boolean accept​(GraphVisitor<CFG,​Statement,​Edge,​V> visitor,
                                  V tool)
        Description copied from interface: Edge
        Accepts the given GraphVisitor. Implementors of this method are responsible for invoking GraphVisitor.visit(Object, Graph, Edge) on this edge. The visiting should stop if such call returns false.
        Specified by:
        accept in interface Edge<Statement,​Edge,​CFG>
        Type Parameters:
        V - the type of auxiliary tool that visitor can use
        Parameters:
        visitor - the visitor that is visiting the Graph containing this edge
        tool - the auxiliary tool that visitor can use
        Returns:
        whether or not the visiting should stop when this call returns, as decided by the visitor itself