Interface ConstraintExpr
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ConstraintExpr.Combination, ConstraintExpr.Comparison
public sealed interface ConstraintExpr
extends Serializable
permits ConstraintExpr.Comparison, ConstraintExpr.Combination
A serializable model of a constrained-type constraint, captured in phase 3 and stored on the
constrained
AggregateSymbol so later phases (and module-cache reloads) can evaluate it
without the original parse tree.
Mirrors the constrainType grammar exactly:
constrainType
: op=(GT|GE|LT|LE|EQUAL|NOTEQUAL|NOTEQUAL2|MATCHES|CONTAINS)? literal // ConstraintExpr.Comparison
| constrainType op=(AND|OR) constrainType // ConstraintExpr.Combination
| LPAREN constrainType RPAREN // transparent (no node)
Deliberately String-only (operator text, literal text, type FQN) so it serializes cleanly with the owning aggregate for binary module caching.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA boolean combination of two constraints.static final recordA leaf: the implicit subject value compared against a literal viaoperator(default==;!=normalised to<>, matching phase 3 / IR lowering).