Package org.jtool.pdg

Class InterPDGEdge

java.lang.Object
org.jtool.pdg.InterPDGEdge
All Implemented Interfaces:
DependencyGraphEdge
Direct Known Subclasses:
InterPDGCD, InterPDGDD

public abstract class InterPDGEdge extends Object implements DependencyGraphEdge
A dependence edge connecting two nodes in different PDGs.
  • Field Details

    • kind

      protected DependencyGraphEdge.Kind kind
      The kind of this edge.
    • src

      protected PDGNode src
      The source node of this edge.
    • dst

      protected PDGNode dst
      The destination node of this edge.
  • Constructor Details

    • InterPDGEdge

      public InterPDGEdge(PDGNode src, PDGNode dst)
      Creates a new object that represents an edge connecting two nodes in different PDGs.
      Parameters:
      src - the source node of this edge
      dst - the destination node of this edge
  • Method Details

    • isInterPDGEdge

      public boolean isInterPDGEdge()
      Tests if this edge represents an edge connecting two nodes in different PDGs.
      Specified by:
      isInterPDGEdge in interface DependencyGraphEdge
      Returns:
      true if this is a connecting edge, otherwise false
    • getSrcId

      public long getSrcId()
      Returns the identification number of the source node of this edge.
      Specified by:
      getSrcId in interface DependencyGraphEdge
      Returns:
      the identification number of the source node
    • getDstId

      public long getDstId()
      Returns the identification number of the destination node of this edge.
      Specified by:
      getDstId in interface DependencyGraphEdge
      Returns:
      the identification number of the destination node
    • getSrcNode

      public PDGNode getSrcNode()
      Returns the source node for this edge.
      Specified by:
      getSrcNode in interface DependencyGraphEdge
      Returns:
      the source node
    • getDstNode

      public PDGNode getDstNode()
      Returns the destination node for this edge.
      Specified by:
      getDstNode in interface DependencyGraphEdge
      Returns:
      the destination node
    • setKind

      public void setKind(DependencyGraphEdge.Kind kind)
      Sets the kind of this dependence edge. This method is not intended to be invoked by clients.
      Specified by:
      setKind in interface DependencyGraphEdge
      Parameters:
      kind - the kind of the dependence edge
    • getKind

      public DependencyGraphEdge.Kind getKind()
      Returns the kind of this dependence edge.
      Specified by:
      getKind in interface DependencyGraphEdge
      Returns:
      the kind of the edge
    • setClassMember

      public void setClassMember()
      Sets as an edge between class and its member.
    • setCall

      public void setCall()
      Sets as a call edge.
    • setExceptionCatch

      public void setExceptionCatch()
      Sets as an exception catch edge.
    • setParameterIn

      public void setParameterIn()
      Sets as a parameter-in dependence.
    • setParameterOut

      public void setParameterOut()
      Sets as a parameter-out dependence.
    • setFieldAccess

      public void setFieldAccess()
      Sets as a field access dependence.
    • setUncoveredFieldAccess

      public void setUncoveredFieldAccess()
      Sets as an uncovered field access dependence.
    • setSummary

      public void setSummary()
      Sets as a summary data dependence.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(InterPDGEdge edge)
      Tests if a given edge is equal to this edge.
      Parameters:
      edge - the edge to be checked
      Returns:
      the true if the given edge is equal to this edge
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object