public class IfNode extends TreeNode implements IIfNode
if(condition) doSomething(); else somethingElse();
if(condition) else if(otherCondition) else
emptyNodeArray, parent
UNKNOWN
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, swapChildren
analyze, 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, verify
getColumn, getEndColumn, getEndLine, getLine, getLineColumnString, getOffsetsString, getSourcePath, getSourcePathString, setColumn, setEnd, setEndColumn, setEndLine, setLine, setSourceLocation, setSourcePath, setStart, span, span
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
contains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getPackageName, getParent, getSpanningStart, getSucceedingNode, isTerminal
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStart
public IfNode(IASToken keyword)
public ASTNodeID getNodeID()
IASNode
public IASNode getStatementContentsNode()
IStatementNode
getStatementContentsNode
in interface IStatementNode
IScopedNode
public IExpressionNode getConditionalExpressionNode()
IConditionalNode
IExpressionNode
that contains the conditional
expression within this conditionalgetConditionalExpressionNode
in interface IConditionalNode
IExpressionNode
or nullpublic IConditionalNode[] getElseIfNodes()
IIfNode
getElseIfNodes
in interface IIfNode
IConditionalNode
elementspublic ITerminalNode getElseNode()
IIfNode
getElseNode
in interface IIfNode
ITerminalNode
or nullpublic void addBranch(ConditionalNode node)
public void addBranch(TerminalNode node)
Copyright © 2016 The Apache Software Foundation. All rights reserved.