Interface StatementDef

All Known Implementing Classes:
ExpressionDef.CallInstanceMethod, ExpressionDef.CallStaticMethod, StatementDef.Assign, StatementDef.DefineAndAssign, StatementDef.If, StatementDef.IfElse, StatementDef.Multi, StatementDef.Return, StatementDef.Switch, StatementDef.Throw, StatementDef.While

The statement definition.
Since:
1.0
Author:
Denis Stepanov
  • Method Details

    • after

      default StatementDef after(StatementDef statement)
      The helper method to turn this statement into a multi statement.
      Parameters:
      statement - statement
      Returns:
      statement
      Since:
      1.2
    • flatten

      default List<StatementDef> flatten()
      Flatten the collection.
      Returns:
      all the statements
      Since:
      1.2
    • multi

      static StatementDef multi(@NonNull @NonNull List<StatementDef> statements)
      The multi line statement.
      Parameters:
      statements - statements
      Returns:
      statement
      Since:
      1.2
    • multi

      static StatementDef multi(@NonNull @NonNull StatementDef... statements)
      The multi line statement.
      Parameters:
      statements - statements
      Returns:
      statement
      Since:
      1.2