Package dev.vortex.api
Interface Expression
public interface Expression
Vortex expression language.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Visitor interface for implementing the visitor pattern on expressions. -
Method Summary
Modifier and TypeMethodDescriptiondefault <T> T
accept
(Expression.Visitor<T> visitor) Accepts a visitor and dispatches to the appropriate visit method based on the expression type.children()
Returns the children of this expression.id()
The globally unique identifier for this type of expression.Optional<byte[]>
metadata()
Returns the serialized metadata for this expression, or empty if serialization is not supported.
-
Method Details
-
id
String id()The globally unique identifier for this type of expression. -
children
List<Expression> children()Returns the children of this expression. -
metadata
Optional<byte[]> metadata()Returns the serialized metadata for this expression, or empty if serialization is not supported. -
accept
Accepts a visitor and dispatches to the appropriate visit method based on the expression type. This method implements the visitor pattern, allowing different operations to be performed on expressions without modifying the expression classes themselves.- Type Parameters:
T
- the return type of the visitor- Parameters:
visitor
- the visitor to accept- Returns:
- the result of the visitor's operation on this expression
-