java.lang.Object
io.github.jspinak.brobot.runner.dsl.statements.Statement
Direct Known Subclasses:
AssignmentStatement, ForEachStatement, IfStatement, MethodCallStatement, ReturnStatement, VariableDeclarationStatement

public abstract class Statement extends Object
Abstract base class for all statements in the Brobot DSL.

A statement represents an executable instruction in the DSL that performs an action but does not produce a value (unlike expressions). Statements form the body of automation functions and control the flow of execution.

Supported statement types:

  • Variable declarations - Declare and optionally initialize variables
  • Assignments - Assign values to existing variables
  • Method calls - Invoke methods for their side effects
  • Control flow - If statements and forEach loops
  • Returns - Return values from functions

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

See Also:
  • Constructor Details

    • Statement

      public Statement()
  • Method Details

    • getStatementType

      public String getStatementType()
      The discriminator field used by Jackson to determine the concrete type of this statement during JSON deserialization. Valid values: "variableDeclaration", "assignment", "if", "forEach", "return", "methodCall"
    • setStatementType

      public void setStatementType(String statementType)
      The discriminator field used by Jackson to determine the concrete type of this statement during JSON deserialization. Valid values: "variableDeclaration", "assignment", "if", "forEach", "return", "methodCall"