Interface StatementDef

All Known Implementing Classes:
ExpressionDef.InvokeInstanceMethod, ExpressionDef.InvokeStaticMethod, StatementDef.Assign, StatementDef.DefineAndAssign, StatementDef.If, StatementDef.IfElse, StatementDef.Multi, StatementDef.PutField, StatementDef.PutStaticField, StatementDef.Return, StatementDef.Switch, StatementDef.Synchronized, StatementDef.Throw, StatementDef.Try, 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
    • doTry

      default StatementDef.Try doTry()
      Try statement.
      Returns:
      The try statement
      Since:
      1.5
    • doTry

      static StatementDef.Try doTry(StatementDef statement)
      Try statement.
      Parameters:
      statement - The statement to try
      Returns:
      The try statement
      Since:
      1.5
    • 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