Class CallGraphEdge
- java.lang.Object
-
- it.unive.lisa.interprocedural.callgraph.CallGraphEdge
-
- All Implemented Interfaces:
Edge<CallGraphNode,CallGraphEdge,BaseCallGraph>
public class CallGraphEdge extends java.lang.Object implements Edge<CallGraphNode,CallGraphEdge,BaseCallGraph>
An edge between twoCallGraphNodes in aBaseCallGraph.
-
-
Constructor Summary
Constructors Constructor Description CallGraphEdge(CallGraphNode source, CallGraphNode destination)Build the edge.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V> booleanaccept(GraphVisitor<BaseCallGraph,CallGraphNode,CallGraphEdge,V> visitor, V tool)Accepts the givenGraphVisitor.booleancanBeSimplified()Yieldstrueif and only if this edge could be simplified if one of the nodes connected to it is simplified (i.e., removed from the graph).booleanequals(java.lang.Object obj)CallGraphNodegetDestination()Yields the node where this edge ends.CallGraphNodegetSource()Yields the node where this edge originates.inthashCode()CallGraphEdgenewInstance(CallGraphNode source, CallGraphNode destination)Builds a new instance of this edge, connecting the given nodes.java.lang.StringtoString()
-
-
-
Constructor Detail
-
CallGraphEdge
public CallGraphEdge(CallGraphNode source, CallGraphNode destination)
Build the edge.- Parameters:
source- the source nodedestination- the destination node
-
-
Method Detail
-
getSource
public CallGraphNode getSource()
Description copied from interface:EdgeYields the node where this edge originates.- Specified by:
getSourcein interfaceEdge<CallGraphNode,CallGraphEdge,BaseCallGraph>- Returns:
- the source node
-
getDestination
public CallGraphNode getDestination()
Description copied from interface:EdgeYields the node where this edge ends.- Specified by:
getDestinationin interfaceEdge<CallGraphNode,CallGraphEdge,BaseCallGraph>- Returns:
- the destination node
-
canBeSimplified
public boolean canBeSimplified()
Description copied from interface:EdgeYieldstrueif and only if this edge could be simplified if one of the nodes connected to it is simplified (i.e., removed from the graph).- Specified by:
canBeSimplifiedin interfaceEdge<CallGraphNode,CallGraphEdge,BaseCallGraph>- Returns:
- whether or not this edge can be simplified
-
newInstance
public CallGraphEdge newInstance(CallGraphNode source, CallGraphNode destination)
Description copied from interface:EdgeBuilds a new instance of this edge, connecting the given nodes.- Specified by:
newInstancein interfaceEdge<CallGraphNode,CallGraphEdge,BaseCallGraph>- Parameters:
source- the source nodedestination- the destination node- Returns:
- a new instance of this edge, connecting the given nodes
-
accept
public <V> boolean accept(GraphVisitor<BaseCallGraph,CallGraphNode,CallGraphEdge,V> visitor, V tool)
Description copied from interface:EdgeAccepts the givenGraphVisitor. Implementors of this method are responsible for invokingGraphVisitor.visit(Object, Graph, Edge)on this edge. The visiting should stop if such call returnsfalse.- Specified by:
acceptin interfaceEdge<CallGraphNode,CallGraphEdge,BaseCallGraph>- Type Parameters:
V- the type of auxiliary tool thatvisitorcan use- Parameters:
visitor- the visitor that is visiting theGraphcontaining this edgetool- the auxiliary tool thatvisitorcan use- Returns:
- whether or not the visiting should stop when this call returns, as decided by the visitor itself
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-