Package dev.vortex.api.proto
Class Expressions
java.lang.Object
dev.vortex.api.proto.Expressions
Generate a protocol buffers representation of an
Expression
.-
Method Summary
Modifier and TypeMethodDescriptionstatic Expression
deserialize
(ExprProtos.Expr expr) Deserialize a protocol buffer representation back into anExpression
object.static ExprProtos.Expr
serialize
(Expression expression) Serialize anExpression
to a protocol buffer.
-
Method Details
-
serialize
Serialize anExpression
to a protocol buffer. -
deserialize
Deserialize a protocol buffer representation back into anExpression
object. The method examines the expression ID and creates the appropriate concrete expression type based on the registered expression types (binary, get_item, root, literal, not). If the expression ID is not recognized, anUnknown
expression is created.- Parameters:
expr
- the protocol buffer expression to deserialize- Returns:
- the deserialized Expression object
-