001package gudusoft.gsqlparser.analyzer.v2.callgraph; 002 003import gudusoft.gsqlparser.ir.common.Confidence; 004import gudusoft.gsqlparser.ir.common.Evidence; 005import gudusoft.gsqlparser.ir.common.SourceAnchor; 006 007/** 008 * An edge in the call graph representing a call from one routine to another. 009 */ 010public class CallEdge { 011 012 private final String callerRoutineId; 013 private final String calleeRoutineId; 014 private final SourceAnchor callSiteAnchor; 015 private final Evidence evidence; 016 private final Confidence confidence; 017 018 public CallEdge(String callerRoutineId, String calleeRoutineId, 019 SourceAnchor callSiteAnchor, Evidence evidence, Confidence confidence) { 020 this.callerRoutineId = callerRoutineId; 021 this.calleeRoutineId = calleeRoutineId; 022 this.callSiteAnchor = callSiteAnchor; 023 this.evidence = evidence; 024 this.confidence = confidence; 025 } 026 027 public String getCallerRoutineId() { return callerRoutineId; } 028 public String getCalleeRoutineId() { return calleeRoutineId; } 029 public SourceAnchor getCallSiteAnchor() { return callSiteAnchor; } 030 public Evidence getEvidence() { return evidence; } 031 public Confidence getConfidence() { return confidence; } 032 033 @Override 034 public String toString() { 035 return "CallEdge{" + callerRoutineId + " -> " + calleeRoutineId + "}"; 036 } 037}