public interface ITerminalNode extends IStatementNode
else
clause in an if
statement,
a default
clause in a switch
statement,
or a finally
clause in a try
statement.
The shape of this node is:
ITerminalNode IBlockNode <-- getStatementContentsNode()Example 1:
if (flag) doThis(); else doThat(); }is represented as
IIfNode IConditionalNode IIdentifierNode "flag" IBlockNode IFunctionCallNode ... ITerminalNode "else" IBlockNode IFunctionCallNode ...Example 2:
switch(i) { case 0: return a; default: return b; }is represented as
ISwitchNode IIdentifierNode "i" IBlockNode IConditionalNode INumericLiteralNode 0 IBlockNode IReturnNode IIdentifierNode "a" ITerminalNode "default" IBlockNode IReturnNode IIdentifierNode "b"Example 3:
finally { ... }is represented as
ITerminalNode "finally" IBlockNode ...
Modifier and Type | Interface and Description |
---|---|
static class |
ITerminalNode.TerminalKind
Represents a kind of terminal node
|
UNKNOWN
Modifier and Type | Method and Description |
---|---|
ITerminalNode.TerminalKind |
getKind()
Represents the kind of the terminal condition
|
getStatementContentsNode
contains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getNodeID, getPackageName, getParent, getSpanningStart, getSucceedingNode, isTerminal
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStart
ITerminalNode.TerminalKind getKind()
ITerminalNode.TerminalKind
Copyright © 2016 The Apache Software Foundation. All rights reserved.