Interface IfNode

All Superinterfaces:
ASTNode, BlockItemNode, StatementNode

public interface IfNode extends StatementNode
  • Method Details

    • getCondition

      ExpressionNode getCondition()
      The condition controlling this "if" statement
      Returns:
      the branch condition expression
    • getTrueBranch

      StatementNode getTrueBranch()
      Returns the "true" branch statement--where control moves to if the condition evaluates to true.
      Returns:
      the true branch statement
    • getFalseBranch

      StatementNode getFalseBranch()
      Returns the "else" (aka "false") branch. May be null (if this "if" statement has no "else" clause).
      Returns:
      false branch, or null
    • copy

      IfNode copy()
      Description copied from interface: ASTNode
      Returns a deep copy of this AST node. The node and all of its descendants will be cloned. The cloning does not copy analysis or attribute information.
      Specified by:
      copy in interface ASTNode
      Specified by:
      copy in interface BlockItemNode
      Specified by:
      copy in interface StatementNode
      Returns:
      deep copy of this node