public final class Transformation extends Object
Transformation (lineage2-contract.md §4.2, D-08):
original expression text, normalized form (FINGERPRINT-V1 normalization
family), SHA-256 of the normalized form, and the location of the
original expression in the unit (the normalized form is a
canonical rewrite and intentionally has no coordinates).
Unlike Endpoint, the JSON form always carries both the
sourceLocation and locationNullReason keys (one of the
two is null) — the gold-fixture-pinned shape.
Internal API: not part of the public gsqlparser surface.
| Constructor and Description |
|---|
Transformation(String originalExpression,
String normalizedExpression,
String expressionHash,
SourceLocation sourceLocation,
LocationNullReason locationNullReason) |
| Modifier and Type | Method and Description |
|---|---|
String |
getExpressionHash() |
LocationNullReason |
getLocationNullReason()
Nullable — set only when
sourceLocation is null. |
String |
getNormalizedExpression() |
String |
getOriginalExpression() |
SourceLocation |
getSourceLocation()
Nullable.
|
static Transformation |
of(String originalExpression,
SourceLocation sourceLocation,
LocationNullReason locationNullReason)
Convenience factory: normalizes
originalExpression with the
FINGERPRINT-V1 normalization family and hashes the normalized form. |
public Transformation(String originalExpression, String normalizedExpression, String expressionHash, SourceLocation sourceLocation, LocationNullReason locationNullReason)
public static Transformation of(String originalExpression, SourceLocation sourceLocation, LocationNullReason locationNullReason)
originalExpression with the
FINGERPRINT-V1 normalization family and hashes the normalized form.public String getOriginalExpression()
public String getNormalizedExpression()
public String getExpressionHash()
public SourceLocation getSourceLocation()
public LocationNullReason getLocationNullReason()
sourceLocation is null.