Package: org.codehaus.groovy.ast.stmt

## [Java] Class DoWhileStatement

- org.codehaus.groovy.ast.stmt.DoWhileStatement

- All Implemented Interfaces and Traits:
    LoopingStatement

      public class DoWhileStatement
      extends Statement
      implements LoopingStatement

  Represents a do { ... } while (condition) loop in Groovy. A do-while loop executes its body unconditionally on the first iteration, then evaluates a BooleanExpression after each iteration to decide whether to repeat. The loop body always executes at least once, differentiating it from a WhileStatement.

  See Also:
    LoopingStatement
    Statement
    BooleanExpression
    WhileStatement

- - ### Constructor Summary

    Constructors
    Constructor and description
    `DoWhileStatement(BooleanExpression booleanExpression, Statement loopBlock)` Constructs a DoWhileStatement with a loop body and condition.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public BooleanExpression` | `getBooleanExpression()` Returns the BooleanExpression} evaluated after each iteration.
    `` | `public Statement` | `getLoopBlock()` Returns the loop body Statement}.
    `` | `public void` | `setBooleanExpression(BooleanExpression booleanExpression)` Sets the BooleanExpression} to evaluate after each iteration.
    `` | `public void` | `setLoopBlock(Statement loopBlock)` Sets the loop body Statement}.
    `` | `public void` | `visit(GroovyCodeVisitor visitor)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Statement` | `addStatementAnnotation, addStatementLabel, copyStatementLabels, getStatementAnnotations, getStatementLabel, getStatementLabels, isEmpty, setStatementLabel`
    `class ASTNode` | `copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit`

- - ### Constructor Detail

    - #### public DoWhileStatement(BooleanExpression booleanExpression, Statement loopBlock)

      Constructs a DoWhileStatement with a loop body and condition.

      Parameters:
        `booleanExpression` - the BooleanExpression} evaluated after each iteration
        `loopBlock` - the Statement} to execute; always runs at least once

  - ### Method Detail

    - #### public BooleanExpression getBooleanExpression()

      Returns the BooleanExpression} evaluated after each iteration.

      Returns:
        the loop condition BooleanExpression}

    - #### public Statement getLoopBlock()

      Returns the loop body Statement}.

      Returns:
        the loop block Statement}

    - #### public void setBooleanExpression(BooleanExpression booleanExpression)

      Sets the BooleanExpression} to evaluate after each iteration.

      Parameters:
        `booleanExpression` - the loop condition BooleanExpression}

    - #### public void setLoopBlock(Statement loopBlock)

      Sets the loop body Statement}.

      Parameters:
        `loopBlock` - the loop block Statement}

    - #### public void visit(GroovyCodeVisitor visitor)