Interface IfTree
- All Superinterfaces:
StatementTree, Tree
A tree node for an 'if' statement.
For example:
if ( condition )
thenStatement
if ( condition )
thenStatement
else
elseStatement
- Since:
- 9
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the condition expression of this 'if' statement.Returns the then statement of this 'if' statement.Returns the 'then' statement of this 'if' statement.Methods inherited from interface Tree
accept, getEndPosition, getKind, getStartPosition
-
Method Details
-
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
-