java.lang.Object
io.github.jspinak.brobot.runner.dsl.expressions.Expression
Direct Known Subclasses:
BinaryOperationExpression, BuilderExpression, LiteralExpression, MethodCallExpression, VariableExpression

public abstract class Expression extends Object
Abstract base class for all expressions in the Brobot DSL.

An expression represents a value-producing computation in the DSL. Expressions can be:

  • Literals (constant values like "hello" or 42)
  • Variables (references to previously declared values)
  • Method calls (invocations that return values)
  • Binary operations (arithmetic or logical operations between two expressions)
  • Builder expressions (fluent API pattern for constructing complex objects)

This class uses Jackson polymorphic deserialization to support parsing different expression types from JSON based on the "expressionType" discriminator field.

See Also:
  • Constructor Details

    • Expression

      public Expression()
  • Method Details

    • getExpressionType

      public String getExpressionType()
      The discriminator field used by Jackson to determine the concrete type of this expression during JSON deserialization. Valid values: "literal", "variable", "methodCall", "binaryOperation", "builder"
    • setExpressionType

      public void setExpressionType(String expressionType)
      The discriminator field used by Jackson to determine the concrete type of this expression during JSON deserialization. Valid values: "literal", "variable", "methodCall", "binaryOperation", "builder"