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 Expressiondeserialize(ExprProtos.Expr expr) Deserialize a protocol buffer representation back into anExpressionobject.static ExprProtos.Exprserialize(Expression expression) Serialize anExpressionto a protocol buffer.
-
Method Details
-
serialize
Serialize anExpressionto a protocol buffer. -
deserialize
Deserialize a protocol buffer representation back into anExpressionobject. 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, anUnknownexpression is created.- Parameters:
expr- the protocol buffer expression to deserialize- Returns:
- the deserialized Expression object
-