Package org.jtool.pdg
Class Dependence
java.lang.Object
org.jtool.graph.GraphElement
org.jtool.graph.GraphEdge
org.jtool.pdg.Dependence
- All Implemented Interfaces:
DependencyGraphEdge
A dependence edge of PDGs.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jtool.pdg.DependencyGraphEdge
DependencyGraphEdge.Kind
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DependencyGraphEdge.Kind
The kind of this dependence edge. -
Constructor Summary
ConstructorsConstructorDescriptionDependence
(PDGNode src, PDGNode dst) Creates a new object that represents a dependence edge. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
equals
(Dependence dependence) Tests if a given dependence edge is equal to this edge.long
getDstId()
Returns the identification number of the destination node of this edge.Returns the source node of this dependence edge.getKind()
Returns the kind of this dependence edge.long
getSrcId()
Returns the identification number of the source node of this edge.Returns the source node of this dependence edge.int
hashCode()
boolean
Tests if this edge represents a dependence.void
Sets the kind of this dependence edge.static List<Dependence>
sortEdges
(Collection<? extends Dependence> collection) Sorts the list of dependence edges.toString()
Obtains information on this edge.Methods inherited from class org.jtool.graph.GraphEdge
equals, equals, setDstNode, setSrcNode, sortGrapgEdge
Methods inherited from class org.jtool.graph.GraphElement
difference, equals, getIdString, intersection, subset, subsetEqual, union
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jtool.pdg.DependencyGraphEdge
getVariable, isCall, isCD, isClassMember, isDD, isDeclaration, isDefOrder, isDefUse, isExceptionCatch, isFallThrough, isFalse, isFieldAccess, isInterPDGEdge, isLCDD, isLIDD, isOutput, isParameterIn, isParameterOut, isSummary, isTrue, isUncoveredFieldAccess
-
Field Details
-
kind
The kind of this dependence edge.
-
-
Constructor Details
-
Dependence
Creates a new object that represents a dependence edge. This method is not intended to be invoked by clients.- Parameters:
src
- the source nodedst
- the destination node
-
-
Method Details
-
isDependence
public boolean isDependence()Tests if this edge represents a dependence.- Specified by:
isDependence
in interfaceDependencyGraphEdge
- Returns:
true
if this is a dependence edge, otherwisefalse
-
getSrcId
public long getSrcId()Returns the identification number of the source node of this edge.- Specified by:
getSrcId
in interfaceDependencyGraphEdge
- Overrides:
getSrcId
in classGraphEdge
- 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 interfaceDependencyGraphEdge
- Overrides:
getDstId
in classGraphEdge
- Returns:
- the identification number of the destination node
-
getSrcNode
Returns the source node of this dependence edge.- Specified by:
getSrcNode
in interfaceDependencyGraphEdge
- Overrides:
getSrcNode
in classGraphEdge
- Returns:
- the source node
-
getDstNode
Returns the source node of this dependence edge.- Specified by:
getDstNode
in interfaceDependencyGraphEdge
- Overrides:
getDstNode
in classGraphEdge
- Returns:
- the source node
-
setKind
Sets the kind of this dependence edge. This method is not intended to be invoked by clients.- Specified by:
setKind
in interfaceDependencyGraphEdge
- Parameters:
kind
- the kind of the dependence edge
-
getKind
Returns the kind of this dependence edge.- Specified by:
getKind
in interfaceDependencyGraphEdge
- Returns:
- the kind of the edge
-
equals
- Overrides:
equals
in classGraphElement
-
equals
Tests if a given dependence edge is equal to this edge.- Parameters:
dependence
- the dependence edge to be checked- Returns:
- the
true
if the given edge is equal to this edge
-
hashCode
public int hashCode() -
toString
Obtains information on this edge. -
sortEdges
Sorts the list of dependence edges.- Parameters:
collection
- the list of the dependence edges to be sorted- Returns:
- the sorted list of the dependence edges
-