public class IfNode extends TreeNode implements IIfNode
if(condition) doSomething(); else somethingElse();
if(condition) else if(otherCondition) elseemptyNodeArray, parentUNKNOWN| Modifier and Type | Method and Description |
|---|---|
void |
addBranch(ConditionalNode node) |
void |
addBranch(TerminalNode node) |
IExpressionNode |
getConditionalExpressionNode()
Returns the
IExpressionNode that contains the conditional
expression within this conditional |
IConditionalNode[] |
getElseIfNodes()
Returns an in-order array of else if statements that are branches of this
if statement
|
ITerminalNode |
getElseNode()
Returns the else clause of this if statement
|
ASTNodeID |
getNodeID()
Get the opcode of this node
|
IASNode |
getStatementContentsNode()
returns the contents contained with the statement
|
addChild, addChild, addChildInOrder, addChildPostNormalize, addTemporaryChild, getChild, getChildCount, getInitialChildCount, normalize, optimizeChildren, removeAllChildren, removeChild, removeTemporaryChild, replaceChild, sortChildren, swapChildrenanalyze, buildInnerString, buildStringRecursive, canContinueContainmentSearch, collectImportNodes, combineAttributes, connectedToProjectScope, contains, endAfter, endAfter, endBefore, endBefore, fillInOffsets, getAbsoluteEnd, getAbsoluteStart, getAncestorOfType, getASScope, getContainingFilePath, getContainingNode, getContainingScope, getEnd, getFileScope, getFileSpecification, getInnerString, getNodeKind, getPackageName, getParent, getScopeNode, getSpanningStart, getStart, getSucceedingNode, getWorkspace, isTerminal, isTransparent, looselyContains, runPostProcess, setChildren, setParent, span, span, span, startAfter, startAfter, startBefore, startBefore, toString, tryGetOffsetLookup, verifygetColumn, getEndColumn, getEndLine, getLine, getLineColumnString, getOffsetsString, getSourcePath, getSourcePathString, setColumn, setEnd, setEndColumn, setEndLine, setLine, setSourceLocation, setSourcePath, setStart, span, spanclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcontains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getPackageName, getParent, getSpanningStart, getSucceedingNode, isTerminalgetAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStartpublic IfNode(IASToken keyword)
public ASTNodeID getNodeID()
IASNodepublic IASNode getStatementContentsNode()
IStatementNodegetStatementContentsNode in interface IStatementNodeIScopedNodepublic IExpressionNode getConditionalExpressionNode()
IConditionalNodeIExpressionNode that contains the conditional
expression within this conditionalgetConditionalExpressionNode in interface IConditionalNodeIExpressionNode or nullpublic IConditionalNode[] getElseIfNodes()
IIfNodegetElseIfNodes in interface IIfNodeIConditionalNode elementspublic ITerminalNode getElseNode()
IIfNodegetElseNode in interface IIfNodeITerminalNode or nullpublic void addBranch(ConditionalNode node)
public void addBranch(TerminalNode node)
Copyright © 2016 The Apache Software Foundation. All rights reserved.