001package gudusoft.gsqlparser.ir.common; 002 003import java.util.Collections; 004import java.util.List; 005 006/** 007 * Multi-segment source anchor for cases like dynamic SQL concatenation 008 * that reference multiple code locations. 009 */ 010public final class SourceSpan { 011 012 /** Ordered list of source anchors. */ 013 public final List<SourceAnchor> spans; 014 015 /** Description (e.g., "Dynamic SQL concatenated from 3 assignments"). */ 016 public final String description; 017 018 public SourceSpan(List<SourceAnchor> spans, String description) { 019 this.spans = spans != null ? Collections.unmodifiableList(spans) : Collections.<SourceAnchor>emptyList(); 020 this.description = description; 021 } 022 023 @Override 024 public String toString() { 025 return "SourceSpan{" + description + ", spans=" + spans.size() + "}"; 026 } 027}