-
- すべてのスーパー・インタフェース:
StatementTree
,Tree
public interface IfTree extends StatementTree
「if」文のツリー・ノードです。 たとえば、if ( condition ) thenStatement if ( condition ) thenStatement else elseStatement
- 導入されたバージョン:
- 9
-
-
メソッドのサマリー
すべてのメソッド インスタンス・メソッド 抽象メソッド 修飾子と型 メソッド 説明 ExpressionTree
getCondition()
この'if'文の条件式を返します。StatementTree
getElseStatement()
この'if'文のthen文を返します。StatementTree
getThenStatement()
この'if'文の'then'文を返します。-
interface jdk.nashorn.api.tree.Treeから継承したメソッド
accept, getEndPosition, getKind, getStartPosition
-
-
-
-
メソッドの詳細
-
getCondition
ExpressionTree getCondition()
この'if'文の条件式を返します。- 戻り値:
- 条件式
-
getThenStatement
StatementTree getThenStatement()
この'if'文の'then'文を返します。- 戻り値:
- 'then'文
-
getElseStatement
StatementTree getElseStatement()
この'if'文のthen文を返します。このif文にelseブランチがない場合はnull。- 戻り値:
- 'else'文
-
-