Interface IfTree

  • All Superinterfaces:
    StatementTree, Tree

    public interface IfTree
    extends StatementTree
    A tree node for an 'if' statement. For example:
       if ( condition )
          thenStatement
    
       if ( condition )
           thenStatement
       else
           elseStatement
     
    Since:
    9
    • Method Detail

      • getCondition

        ExpressionTree getCondition()
        Returns the condition expression of this 'if' statement.
        Returns:
        the condition expression
      • getThenStatement

        StatementTree getThenStatement()
        Returns the 'then' statement of this 'if' statement.
        Returns:
        the 'then' statement
      • getElseStatement

        StatementTree getElseStatement()
        Returns the then statement of this 'if' statement. null if this if statement has no else branch.
        Returns:
        the 'else' statement