Evaluate an expression with given runtime context. Optional — used for semantic validation and test evaluation.
Extract all structured references from an expression (variables, root properties, beans, types, functions). Returns references even for syntactically invalid expressions via heuristic fallback.
Format a SpEL expression with consistent spacing and indentation.
Optionaloptions: FormatOptionsGet completion suggestions at a given cursor position. Returns context-aware suggestions when contextSchema is provided, otherwise returns static keyword/operator completions.
OptionalcontextSchema: ContextSchemaGet the available context schema. Returns null if no context information is available (syntax-only validation, no type/context check).
Parse a SpEL expression and return syntax validation results. For syntactically invalid expressions, the errors array is non-empty.
Validate expression references against a context schema. Detects missing variables, unknown properties, type mismatches.
Staticfrom
SpelEvaluator — abstract interface for SpEL parsing and validation.
Defined in spel-ts as the canonical source of truth. Consumers (nl2spel, spel-editor, CLI tools) program against this interface without depending on any specific implementation.
spel-ts provides a built-in implementation: SpelEvaluatorAdapter.