public final class SourceSpan extends Object
[startOffset, endOffset) span over the original
input SQL string, tagged with what kind of content lives there.
Used by SourceSpanLedger to cover every byte of the input.
Immutable.
Plan reference: §6 (token/SourceSpan.java) and §10.3 (the
construction sketch).
| Modifier and Type | Class and Description |
|---|---|
static class |
SourceSpan.Kind
Classification of what the span represents.
|
| Constructor and Description |
|---|
SourceSpan(int startOffset,
int endOffset,
SourceSpan.Kind kind,
String text) |
| Modifier and Type | Method and Description |
|---|---|
int |
getEndOffset() |
SourceSpan.Kind |
getKind() |
int |
getStartOffset() |
String |
getText() |
int |
length()
Convenience: the half-open width of the span.
|
String |
toString() |
public SourceSpan(int startOffset, int endOffset, SourceSpan.Kind kind, String text)
public int getStartOffset()
public int getEndOffset()
public SourceSpan.Kind getKind()
public int length()
text.length().