public class TryNode extends TreeNode implements ITryNode, IStatementNode
emptyNodeArray, parent
UNKNOWN
Modifier and Type | Method and Description |
---|---|
void |
addCatchClause(CatchNode node)
Adds a
catch caluse in the order in which it was found |
void |
addFinallyBlock(TerminalNode node)
Adds a
finally clause in the order in which it was found |
ICatchNode |
getCatchNode(int i)
Returns the
i th catch clause for this
try statement. |
int |
getCatchNodeCount()
Returns the number of
catch clauses for this
try statement. |
BlockNode |
getContentsNode() |
ITerminalNode |
getFinallyNode()
Returns the
finally clause of this try
statement. |
ASTNodeID |
getNodeID()
Get the opcode of this node
|
IASNode |
getStatementContentsNode()
returns the contents contained with the statement
|
protected void |
setChildren(boolean fillInOffsets)
If this node has custom children (names, arguments, etc), shove them into
the list of children.
|
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, 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 TryNode(IASToken keyword)
keyword
- The token representing the try
keyword.public ASTNodeID getNodeID()
IASNode
protected void setChildren(boolean fillInOffsets)
NodeBase
setChildren
in class NodeBase
public IASNode getStatementContentsNode()
IStatementNode
getStatementContentsNode
in interface IStatementNode
IScopedNode
public int getCatchNodeCount()
ITryNode
catch
clauses for this
try
statement.getCatchNodeCount
in interface ITryNode
public ICatchNode getCatchNode(int i)
ITryNode
i
th catch
clause for this
try
statement.getCatchNode
in interface ITryNode
ICatchNode
or null
public ITerminalNode getFinallyNode()
ITryNode
finally
clause of this try
statement.getFinallyNode
in interface ITryNode
ITerminalNode
or null
public void addCatchClause(CatchNode node)
catch
caluse in the order in which it was foundnode
- The node representing a catch
clause.public void addFinallyBlock(TerminalNode node)
finally
clause in the order in which it was foundnode
- The node representing the finally
cluase.public BlockNode getContentsNode()
Copyright © 2016 The Apache Software Foundation. All rights reserved.