Class Expressions

java.lang.Object
dev.vortex.api.proto.Expressions

public final class Expressions extends Object
Generate a protocol buffers representation of an Expression.
  • Method Details

    • serialize

      public static ExprProtos.Expr serialize(Expression expression)
      Serialize an Expression to a protocol buffer.
    • deserialize

      public static Expression deserialize(ExprProtos.Expr expr)
      Deserialize a protocol buffer representation back into an Expression 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, an Unknown expression is created.
      Parameters:
      expr - the protocol buffer expression to deserialize
      Returns:
      the deserialized Expression object